makepairs | R Documentation |
Produce a list of all configurations of pairwise exceedances above some threshold u
. Used in censored likelihood estimation.
makepairs(Z, u)
Z |
A |
u |
Censoring threshold. |
List of four data frames. Each data frame has 4 columns and the rows sum to N*d*(d-1)/2
. For each data frame the first two columns are the values and the last two are the indices for the location of these values in the columns of Z
.
Pairs of observations where both components exceed u
.
Pairs of observations where the first component exceeds u
and the second equals u
.
Pairs of observations where the second component exceeds u
and the first equals u
.
Pairs of observations where both components equal u
.
#For a N by d matrix of data "Z" and d by 2 matrix of coordinates "Gcoords". # We use a very small subset of data(Aus_Heat) as an example. ##THIS WILL TAKE A LONG TIME TO RUN WITH THE FULL DATASET## data(Aus_Heat) Z<-Aus_Heat$Temp.[,1:3] Gcoords<-Aus_Heat$coords[1:3,] unif<-function(x) rank(x)/(length(x)+1) Z_U<-Z for(i in 1:dim(Z_U)[2]) Z_U[,i]<-unif(Z[,i]) # Transform to uniform margins Z_Exp<-qexp(Z_U) #Transform to exponential margins q<-0.98 u<-quantile(Z_Exp,prob=q) # Censoring threshold # Create a list of length 4 of pairwise exceedances and index in coordinate matrix Zpair<-makepairs(Z_Exp,u=u)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.