The function gencorr
computes intrinsic or
stationary isotropic generalized correlations (= negative semi-variances
computed with sill (variance) parameter equal to 1) for a set of basic
variogram models formerly made available by the function RFfctn
of
the now archived R package RandomFields.
gencorr(x, variogram.model, param)
A numeric vector with generalized correlations (= negative semi-variances
computed with variance parameter param["variance"] = 1
).
a numeric vector with scaled lag distances, i.e. lag distances
divided by the range parameter param["scale"]
.
a character keyword defining the variogram model.
Currently, the following models are implemented:
"RMaskey"
, "RMbessel"
, "RMcauchy"
,
"RMcircular"
, "RMcubic"
, "RMdagum"
,
"RMdampedcos"
, "RMdewijsian"
, "RMexp"
(default),
"RMfbm"
, "RMgauss"
,
"RMgencauchy"
,
"RMgenfbm"
, "RMgengneiting"
, "RMgneiting"
,
"RMlgd"
,
"RMmatern"
, "RMpenta"
, "RMqexp"
,
"RMspheric"
, "RMstable"
, "RMwave"
,
"RMwhittle"
, see Details.
a named numeric vector with values of the additional
parameters of the variogram models such as the smoothness parameter of
the Whittle-Matérn model, see param.names for the names of
these parameters
. Note that some variogram models (e.g.
"RMcircular"
) do not have any additional parameters.
Andreas Papritz papritz@retired.ethz.ch
The name and parametrization of the variogram models originate from the
function RFfctn
of RandomFields. The equations and further
information are taken (with minor modifications) from the help pages of
the respective functions of the archived R package RandomFields,
version 3.3.14 (Schlather et al., 2022). Note that the variance
(sill, param["variance"]
) and the range parameters
(param["scale"]
) are assumed to be equal to 1 in the following
formulae, and \(x\) is the lag distance. The variogram functions are
stationary and are valid for any number of dimensions if not mentioned
otherwise.
The following intrinsic or stationary isotropic variogram
functions \(\gamma(x)\) are implemented in gencorr
:
RMaskey
$$
\gamma(x)= 1 - (1-x)^\alpha 1_{[0,1]}(x)
$$
\(1_{[0,1]}(x)\) is the indicator function equal to 1 for \(x \in
[0,1]\) and 0 otherwise. This variogram function is
valid for dimension \(d\) if \(\alpha \ge (d+1)/2\). For
\(\alpha=1\) we get the well-known triangle (or tent) model, which is
only valid on the real line.
RMbessel
$$
\gamma(x) = 1 - 2^\nu \Gamma(\nu+1) x^{-\nu} J_\nu(x)
$$
where \(\nu \ge \frac{d-2}2\), \(\Gamma\) denotes
the gamma function and \(J_\nu\) is a Bessel function of first kind.
This models a hole effect (see Chilès and Delfiner, 1999,
p. 92).
An important case is \(\nu=-0.5\) which gives the variogram
function
$$\gamma(x)= 1 - \cos(x)$$
and which is only valid for \(d=1\) (this equals RMdampedcos
for \(\lambda = 0\)).
A second important case is \(\nu=0.5\) with variogram function
$$
\gamma(x) = \left(1 - \frac{\sin(x)}{x}\right) 1_{x>0}
$$
which is valid for \(d \le 3\). This coincides with RMwave
.
RMcauchy
$$\gamma(x) = 1 - (1 + x^2)^{-\gamma}$$
where \(\gamma > 0\). The parameter \(\gamma\) determines the
asymptotic power law. The smaller \(\gamma\), the longer the
long-range dependence. The generalized Cauchy Family
(RMgencauchy
) includes this family for the choice \(\alpha =
2\) and \(\beta = 2 \gamma\).
RMcircular
$$
\gamma(x) = 1 - \left(1 -\frac{2}{\pi} \left(x \sqrt{1-x^2} + \arcsin(x)\right)\right) 1_{[0,1]}(x)
$$
This variogram function is valid only for dimensions \(d \le 2\).
RMcubic
$$
\gamma(x) = 1 - (1-7 x^2 + 8.75 x^3 - 3.5 x^5 + 0.75 x^7) 1_{[0,1]}(x)
$$
The model is only valid for dimensions \(d \le 3\). It is a 2 times
differentiable variogram function with compact support (see
Chilès and Delfiner, 1999, p. 84).
RMdagum
$$
\gamma(x) = (1+x^{-\beta})^{-\gamma / \beta}
$$
The parameters \(\beta\) and \(\gamma\) can be varied in the
intervals \((0,1]\) and \((0,1)\), respectively. Like the
generalized Cauchy model (RMgencauchy
) the Dagum family can be
used to model separately fractal dimension and Hurst effect
(see Berg et al., 2008).
RMdampedcos
$$
\gamma(x) = 1 - \exp(-\lambda x) \cos(x)
$$
The model is valid for any dimension \(d\). However, depending on
the dimension of the random field the following bound
\(
\lambda \ge 1/{\tan(\pi/(2d))}
\) has to be respected.
This variogram function models a hole effect
(see Chilès and Delfiner, 1999, p. 92).
For \(\lambda = 0\) we obtain
$$\gamma(x)= 1 - \cos(x)$$ which is only valid
for \(d=1\) and corresponds to RMbessel
for \(\nu=-0.5\).
RMdewijsian
$$
\gamma(x) = \log(1 + x^{\alpha})
$$
where \(\alpha \in (0,2]\). This is an intrinsic variogram function.
Originally, the logarithmic model \(\gamma(x)
= \log(x)\) was named after de Wijs and
reflects a principle of
similarity (see Chilès and Delfiner, 1999, p. 90). But
note that \(\gamma(x) = \log(x)\) is not
a valid variogram function.
RMexp
$$\gamma(x) = 1 - e^{-x}$$
This model is a special case of the Whittle model
(RMwhittle
) if \(\nu=0.5\)
and of the stable family (RMstable
)
if \(\nu = 1\). Moreover, it is the continuous-time analogue
of the first order auto-regressive time series covariance structure.
RMfbm
$$\gamma(x) = x^\alpha$$
where \(\alpha \in (0,2)\). This is an
intrinsically stationary variogram function. For \(\alpha=1\)
we get a variogram function corresponding to a standard
Brownian Motion. For \(\alpha \in (0,2)\) the
quantity \(H = \frac{\alpha}{2}\) is called Hurst index
and determines the fractal dimension \(D = d + 1 - H\) of the corresponding
Gaussian sample paths where \(d\) is the
dimension of the random field
(see Chilès and Delfiner, 1999, p. 89).
RMgauss
$$\gamma(x) = 1 - e^{-x^2}$$
The Gaussian model has an infinitely differentiable variogram
function. This smoothness is artificial. Furthermore, this often
leads to singular matrices and therefore numerically instable
procedures (see Stein, 1999, p. 29). The Gaussian model is included in
the stable class (RMstable
) for the choice \(\alpha = 2\).
RMgencauchy
$$\gamma(x) = 1 - (1 + x^\alpha)^{-\beta/\alpha}$$
where \(\alpha \in (0,2]\) and \(\beta >
0\). This model has a smoothness parameter \(\alpha\) and
a parameter \(\beta\) which determines the asymptotic power law.
More precisely, this model admits simulating random fields where
fractal dimension D of the Gaussian sample path and Hurst
coefficient H can be chosen independently (compare also with
RMlgd
): Here, we have \(D = d + 1 - \alpha/2, \alpha \in
(0,2]\) and \( H = 1 -
\beta/2, \beta > 0\). The smaller \(\beta\), the longer the
long-range dependence. The variogram function is very regular
near the origin, because its Taylor expansion only contains even terms
and reaches its sill slowly. Note that the Cauchy Family
(RMcauchy
) is included in this family for the choice \(\alpha
= 2\) and \(\beta = 2 \gamma\).
RMgenfbm
$$
\gamma(x) = (1 + x^{\alpha})^{\delta/\alpha} - 1
$$
where \(\alpha \in (0,2)\) and \(\delta \in
(0,1)\). This is an intrinsic variogram function.
RMgengneiting
This is a family of stationary models whose elements are specified by
the two parameters \(\kappa\) and \(\mu\) with \(\kappa\) being a
non-negative integer and \(\mu \ge \frac{d}{2}\) with
\(d\) denoting the dimension of the random field (the models can be
used for any dimension). Let \(\beta = \mu + 2\kappa +1/2\).
For \(\kappa = 0\) the model equals the Askey model (RMaskey
)
and is therefore not implemented.
For \(\kappa = 1\) the model is given by
$$ \gamma(x) = 1 - \left(1+\beta x \right)(1-x)^{\beta} 1_{[0,1]}(x), \qquad \beta = \mu +2.5, $$
If \(\kappa = 2\) $$ \gamma(x) = 1 - \left(1 + \beta x + \frac{\beta^{2} - 1}{3} x^{2} \right)(1-x)^{\beta} 1_{[0,1]}(x), \qquad \beta = \mu+4.5, $$
and for \(\kappa = 3\) $$ \gamma(x) = 1 - \left( 1 + \beta x + \frac{(2\beta^{2}-3)}{5} x^{2}+ \frac{(\beta^2 - 4)\beta}{15} x^{3} \right)(1-x)^\beta 1_{[0,1]}(x), \beta = \mu+6.5, $$
A special case of this family is RMgneiting
(with
\(s = 1\) there) for the choice \(\kappa = 3, \mu =
3/2\).
RMgneiting
$$ \gamma(x) = 1 - (1 + 8 s x + 25 s^2 x^2 + 32 s^3 x^3)(1-s x)^8 $$
if \(0 \le x \le \frac{1}{s}\) and
$$\gamma(x)= 1$$ otherwise. Here,
\(s=0.301187465825\). This variogram function is
valid only for dimensions less than or equal to 3. It is 6 times
differentiable and has compact support. This model is an alternative
to RMgauss
as its graph is hardly distinguishable from the graph
of the Gaussian model, but possesses neither the mathematical nor the
numerical disadvantages of the Gaussian model. It is a special case of
RMgengneiting
for the choice \(\kappa=3, \mu=1.5\).
RMlgd
$$
\gamma(x) = \frac{\beta}{\alpha + \beta} x^{\alpha} 1_{[0,1]}(x) +
(1 - \frac{\alpha}{\alpha + \beta} x^{-\beta}) 1_{x>1}(x)
$$
where \(\beta >0\) and \(0 < \alpha \le (3-d)/2\), with \(d\) denoting the dimension of the random field.
The model is only valid for dimension \(d=1,2\). This model admits
simulating random fields where fractal dimension \(D\) of the
Gaussian sample and Hurst coefficient \(H\) can be chosen
independently (compare also RMgencauchy
): Here, the random field
has fractal dimension \(D = d+1 - \alpha/2\) and Hurst coefficient
\(H = 1-\beta/2\) for \(0< \beta \le 1\).
RMmatern
$$
\gamma(x) = 1 - \frac{2^{1-\nu}}{\Gamma(\nu)} (\sqrt{2\nu}x)^\nu
K_\nu(\sqrt{2\nu}x)
$$
where \(\nu > 0\) and \(K_\nu\) is the modified Bessel function of
second kind. This is one of 3 possible parametrizations (Whittle,
Matérn, Handcock-Wallis) of the Whittle-Matérn model. The
Whittle-Matérn model is the model of choice if the smoothness of a
random field is to be parametrized: the sample paths of a Gaussian
random field with this covariance structure are \(m\) times
differentiable if and only if \(\nu > m\) (see Gneiting and Guttorp,
2010, p. 24). Furthermore, the fractal dimension \(D\) of the
Gaussian sample paths is determined by \(\nu\): We have \(D = d +
1 - \nu, \nu \in (0,1)\) and \(D = d\)
for \(\nu > 1\) where \(d\) is the dimension of the random
field (see Stein, 1999, p. 32). If \(\nu=0.5\) the Matérn
model equals RMexp
. For \(\nu\) tending to \(\infty\) a
rescaled Gaussian model RMgauss
appears as limit for the
Handcock-Wallis parametrization.
RMpenta
$$
\gamma(x) = 1 - \left(1 - \frac{22}{3}x^{2} + 33 x^{4} - \frac{77}{2} x^{5} +
\frac{33}{2} x^{7} - \frac{11}{2} x^{9} + \frac{5}{6}x^{11}\right) 1_{[0,1]}(x)
$$
The model is only valid for dimensions \(d \le 3\). It has
a 4 times differentiable variogram function with compact support (cf.
Chilès and Delfiner, 1999, p. 84).
RMqexp
$$\gamma(x)= 1 - \frac{2 e^{-x} - \alpha e^{-2x}}{ 2 - \alpha }$$
where \(\alpha \in [0,1]\).
RMspheric
$$
\gamma(x) = 1 - \left(1 - \frac{3}{2} x + \frac{1}{2} x^3\right) 1_{[0,1]}(x)
$$
This variogram model is valid only for dimensions less than or equal
to 3 and has compact support.
RMstable
$$\gamma(x) = 1 - e^{-x^\alpha}$$
where \(\alpha \in (0,2]\). The parameter
\(\alpha\) determines the fractal dimension \(D\) of the Gaussian
sample paths: \(D = d + 1 - \alpha/2\) where \(d\) is the dimension
of the random field. For \(\alpha < 2\) the Gaussian sample paths
are not differentiable (see Gelfand et al., 2010, p. 25). The stable
family includes the exponential model (RMexp
) for \(\alpha =
1\) and the Gaussian model ( RMgauss
) for \(\alpha = 2\).
RMwave
$$ \gamma(x) = \left(1 - \frac{\sin(x)}{x}\right) 1_{x>0} $$
The model is only valid for dimensions \(d \le 3\). It is a special
case of RMbessel
for \(\nu = 0.5\). This variogram models a
hole effect (see Chilès and Delfiner, 1999, p. 92).
RMwhittle
$$ \gamma(x)=1 - \frac{2^{1- \nu}}{\Gamma(\nu)} x^{\nu}K_{\nu}(x) $$
where \(\nu > 0\) and \(K_\nu\) is the modified Bessel function of
second kind. This is one of 3 possible parametrizations (Whittle,
Matérn, Handcock-Wallis) of the
Whittle-Matérn model, for further details, see
information for entry RMmatern
above.
Berg, C., Mateau, J., Porcu, E. (2008) The dagum family of isotropic correlation functions, Bernoulli, 14, 1134--1149, tools:::Rd_expr_doi("10.3150/08-BEJ139").
Chilès, J.-P., Delfiner, P. (1999) Geostatistics Modeling Spatial Uncertainty, Wiley, New York, tools:::Rd_expr_doi("10.1002/9780470316993").
Gneiting, T. (2002) Compactly supported correlation functions. Journal of Multivariate Analysis, 83, 493--508, tools:::Rd_expr_doi("10.1006/jmva.2001.2056").
Gneiting, T., Schlather, M. (2004) Stochastic models which separate fractal dimension and Hurst effect. SIAM review 46, 269--282, tools:::Rd_expr_doi("10.1137/S0036144501394387").
Gneiting, T., Guttorp, P. (2010) Continuous Parameter Stochastic Process Theory, In Gelfand, A. E., Diggle, P. J., Fuentes, M., Guttrop, P. (Eds.) Handbook of Spatial Statistics, CRC Press, Boca Raton, p. 17--28, tools:::Rd_expr_doi("10.1201/9781420072884").
Schlather M., Malinowski A., Oesting M., Boecker D., Strokorb K., Engelke S., Martini J., Ballani F., Moreva O., Auel J., Menck P.J., Gross S., Ober U., Ribeiro P., Ripley B.D., Singleton R., Pfaff B., R Core Team (2022). RandomFields: Simulation and Analysis of Random Fields. R package version 3.3.14, https://cran.r-project.org/src/contrib/Archive/RandomFields/.
Stein, M. L. (1999) Interpolation of Spatial Data: Some Theory for Kriging, Springer, New York, tools:::Rd_expr_doi("10.1007/978-1-4612-1494-6").
georobPackage
for a description of the model and a brief summary of the algorithms;
georob
for (robust) fitting of spatial linear models;
georobObject
for a description of the class georob
;
profilelogLik
for computing profiles of Gaussian likelihoods;
plot.georob
for display of RE(ML) variogram estimates;
control.georob
for controlling the behaviour of georob
;
georobModelBuilding
for stepwise building models of class georob
;
cv.georob
for assessing the goodness of a fit by georob
;
georobMethods
for further methods for the class georob
;
predict.georob
for computing robust Kriging predictions;
lgnpp
for unbiased back-transformation of Kriging prediction
of log-transformed data;
georobSimulation
for simulating realizations of a Gaussian process
from model fitted by georob
; and finally
sample.variogram
and fit.variogram.model
for robust estimation and modelling of sample variograms.
## scaled lag distances
x <- seq(0, 3, length.out = 100)
## generalized correlations stable model
y <- gencorr(x, variogram.model = "RMstable", param = c(alpha = 1.5))
plot(x, y)
## generalized correlations circular model
y <- gencorr(x, variogram.model = "RMcircular")
plot(x, y)
Run the code above in your browser using DataLab