CauchyCorr | R Documentation |
The Cauchy family of correlation functions is useful to describe spatial processes with power-law decrease of correlation at long distance. It is valid for Euclidean distances in spaces of any dimension, and for great-circle distances on spheres of any dimension. It has a scale parameter (rho
, as in the Matérn correlation function), a shape
(or “smoothness”, Gneiting 2013) parameter, and a long
-memory dep
endence (or, more abstractly, “shape”; Gneiting 2013) parameter (Gneiting and Schlater 2004). The present implementation also accepts a Nugget
parameter. The family can be invoked in two ways. First, the CauchyCorr
function evaluates correlations, using distances as input. Second, a term of the form Cauchy(1|
<...>)
in a formula
specifies a random effect with Cauchy correlation function, using coordinates found in a data frame as input. In the latter case, the correlations between realizations of the random effect for any two observations in the data will be the value of the Cauchy function at the scaled distance between coordinates specified in <...>, using “+” as separator (e.g., Cauchy(1|longitude+latitude)
). A syntax of the form Cauchy(1|longitude+latitude %in% grp)
can be used to specify a Cauchy random effect with independent realizations for each level of the grouping variable grp
.
## Default S3 method:
CauchyCorr(d, rho=1, shape, longdep, Nugget=NULL)
# Cauchy(1|...)
d |
Euclidean or great-circle distance |
rho |
The scaling factor for distance, a real >0. |
shape |
The shape (smoothness) parameter, a real 0<.<=2 for Euclidean distances and 0<.<=1 for great-circle distances. Smoothness increases, and fractal dimension decreases, with increasing shape (the fractal dimension of realizations in spaces of dimension |
longdep |
The long-memory dependence parameter, a real >0. It gives the exponent of the asymptotic decrease of correlation with distance: the smaller |
Nugget |
(Following the jargon of Kriging) a parameter describing a discontinuous decrease in
correlation at zero distance. Correlation will always be 1 at |
... |
Names of coordinates, using “+” as separator (e.g., |
The correlation at distance d>0
is
(1-\textrm{Nugget}) (1+(\rho d)^\textrm{shape})^(-\textrm{longdep/shape})
Scalar/vector/matrix depending on input.
Gneiting, T. and Schlater M. (2004) Stochastic models that separate fractal dimension and the Hurst effect. SIAM Rev. 46: 269–282.
Gneiting T. (2013) Strictly and non-strictly positive definite functions on spheres. Bernoulli 19: 1327-1349.
data("blackcap")
fitme(migStatus ~ means+ Cauchy(1|longitude+latitude),
data=blackcap,
# fixed=list(longdep=0.5,shape=0.5,rho=0.05)
)
## The Cauchy family can be used in Euclidean spaces of any dimension:
set.seed(123)
randpts <- matrix(rnorm(20),nrow=5)
distMatrix <- as.matrix(proxy::dist(randpts))
CauchyCorr(distMatrix,rho=0.1,shape=1,longdep=10)
# See ?MaternCorr for examples of syntaxes for group-specific random effects,
# also handled by Cauchy().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.