CovarianceFct {RandomFields} | R Documentation |
CovarianceFct
returns the values of a covariance function;
see Covariance
for sophisticated models
Variogram
returns the values of a variogram model
Covariance(x, y=NULL, model, param=NULL, dim=ifelse(is.matrix(x),ncol(x),1), Distances, fctcall=c("Cov", "Variogram", "CovMatrix")) CovarianceFct(...) CovMatrix(...) Variogram(x, model, param, dim=ifelse(is.matrix(x),ncol(x),1))
x |
vector or (n x
\code{dim})-matrix. In particular,
if the model is isotropic or |
y |
second vector or matrix in case of non-stationary covariance functions |
model |
for basic models, |
param |
The simplest form of |
dim |
dimension of the space in which the model is applied |
Distances |
for covariance matrices, the lower triangular part
of the distance matrix can be given instead of the values |
fctcall |
internal. This parameter should not be considered by the user |
... |
The function |
Here, only the basic, isotropic models are listed;
see sophisticated
models for nonisotropic and hyper models.
See GetModel
for commands in R to get information
about implemented models and currently used ones.
The implemented models are in standard notation for a covariance function (variance 1, nugget 0, scale 1) and for positive real arguments h:
+
see 'sophisticated'
*
see 'sophisticated'
$
see 'sophisticated'
ave1
see 'sophisticated'
ave2
see 'sophisticated'
bessel
C(h)=2^ν Γ(ν+1)h^{-ν} J_ν(h)
The parameter ν is greater than or equal to (d-2)/2, where d is the dimension of the random field.
Brownian motion
see fractalB
cardinal sine
see wave
cauchy (normal scale mixture)
C(h)=(1+h^2)^(-β)
The parameter β is positive.
The model possesses two generalisations, the gencauchy
model and the hyperbolic
model.
See also nonstatcauchy
in Covariance
.
cauchytbm
C(h)= (1+(1-β/γ)h^α)(1+h^α)^(-β/α-1)
The parameter α is in (0,2] and β
is positive.
The model is valid for dimensions d≤γ;
this has been shown for integer γ, but the
package allows real values of γ.
It allows for simulating random fields where
fractal dimension and Hurst coefficient can be chosen
independently.
It has negative correlations for β>γ and large
h.
This model is equivalent to the model
list("tbm3", n=gamma, list("gencauchy", alpha=alpha,
beta=beta))
circular
C(h)=1-2/pi*(h sqrt(1-h^2)+asin(h)) if 0<=h<=1, 0 otherwise
This isotropic covariance function is valid only for dimensions less than or equal to 2.
cone
This model is used only for methods based on marked point processes
(see RFMethods
); it is defined only in two dimensions.
The corresponding (boolean)
function is a truncated cone with socle. The base has radius
1/2. The model has three parameters, r,
s, and h:
r gives the radius of the top circle of the cone, given
as part of the socle radius; r \in [0,1).
s gives the height of the socle.
h gives the height of the truncated cone.
coxisham
see sophisticated.
cutoff
see sophisticated.
cubic
C(h)= 1- 7 h^2 + 8.75 h^3 - 3.5 h^5 + 0.75 h^7 if 0<=h<=1, 0 otherwise
This model is valid only for dimensions less than or equal to 3. It is a 2 times differentiable covariance functions with compact support.
dagum
C(h) = 1-(1 + h^{-β})^{-γ/β}
RandomFields allows to vary the parameters β and γ within the intervals (0,1] and (0,1), respectively.
dampedcosine
(hole effect model)
C(h)= e^{-λ h} \cos(h), \quad h≥0
This model is valid for dimension 1 iff λ ≥ 1, for dimension 2 iff λ ≥ 1, and for dimension 3 iff λ ≥ √{3}.
DeWijsian
γ(h) = \log(\|h\|^α + 1)
generalised version of the DeWijsian model with α \in (0,2]
EAxxA
and see 'sophisticated'
EtAxxA
and see 'sophisticated'
exponential (normal scale mixture)
C(h)=exp(-h)
This model is a special case of the whittle
model
(for nu = 1/2 there)
and the stable
class (for α = 1).
FD
C(k) = {(-1)^k Γ(1-a/2)^2} / {Γ(1-a/2+k) Γ(1-a/2-k), k in N}
and linearly interpolated otherwise. Here, Γ is the Gamma function and a \in [-1, 1). The model is defined in 1 dimension only.
Remark: the fractionally differenced process stems from time series modelling where the grid locations are multiples of the scale parameter.
fractalB
(fractal Brownian motion)
gamma(h) = h^α
Here, α \in (0,2].
(Implemented for up to three dimensions). See also genB
.
fractgauss
C(h) = 0.5 (|h+1|^{α} - 2|h|^{α} + |h-1|^{α})
This model is the covariance function for the fractional Gaussian noise with Hurst parameter H=α /2, α \in (0,2]. In particular, the model is valid only in one dimension.
gauss (normal scale mixture)
C(h)=exp(-h^2)
This model is a special case of the stable
class
(for a=2 there).
Note that the corresponding function for the random coins
method (cf. the methods based on marked point processes in
RFMethods
) is
exp(-2 h^2).
See gneiting
for an alternative model that does not have
the disadvantages of the Gaussian model.
genB
(generalised fractal Brownian motion)
γ(h) = (h^{α}+1)^{δ} -1
Here, α \in(0,2] and
δ \in (0,1).
(Implemented for up to three dimensions). See also fractalB
.
gencauchy
(generalised cauchy
; normal scale mixture)
C(h)= ≤ft(1+h^α\right)^(-β/α)
The parameter α is in (0,2], and β
is positive.
This model allows for simulating random fields where
fractal dimension and Hurst coefficient can be chosen
independently.
gengneiting
(generalised gneiting
)
If n=1 then
C(h)=≤ft(1+(α+1)h\right) * (1-h)^{α+1} 1_{[0,1]}(h)
If n=2 then
C(h)=≤ft(1+(α+2)h+≤ft((α+2)^2-1\right)h^2/3\right) (1-h)^{α+2} 1_{[0,1]}(h)
If n=3 then
C(h)=≤ft(1+(α+3)h+≤ft(2(α+3)^2-3\right)h^2/5 +≤ft((α+3)^2-4\right)(α+3)h^3/15\right)(1-h)^{α+3} 1_{[0,1]}(h)
The parameter n is a positive integer; here only the cases n=1, 2, 3 are implemented. The parameter α is greater than or equal to (d + 2n +1)/2 where d is the dimension of the random field.
gneiting
C(h)= (1 + 8 s h + 25 s^2 h^2 + 32 s^3 h^3)*(1-s h)^8 if 0 <= h <= 1/s, 0 otherwise
where
s=0.301187465825.
This isotropic covariance function is valid only for dimensions less
than or equal to 3.
It is a 6 times differentiable covariance functions with compact
support.
It is an alternative to the gaussian
model since
its graph is visually hardly distinguishable from the graph of
the Gaussian model, but possesses neither the mathematical and nor the
numerical disadvantages of the Gaussian model.
This model is a special case of gengneiting
(for
n=3 and α=5 there).
Note that, in the original work by Gneiting (1999),
s = 10 sqrt(2) / 47 ~=
.3008965, a numerical value slightly deviating from the
optimal one.
gneitingdiff is obsolete, see the last example in
Sophisticated for a user's definition of gneitingdiff
.
C(h)=( 1 + 8 h α^{-1} + 25 h^2α^{-2} + 32 h^3 α^{-3} ) ( 1-h α^{-1} )^8 2^{1-ν} (Γ(ν))^{-1} h^{ν} K_{ν}(h) 1_{[0,α]}(h)
This isotropic covariance function is valid only for dimensions less
than or equal to 3.
The parameters ν and α are
positive.
This class of models with compact support
allows for smooth parametrisation of the differentiability up to
order 6.
hyperbolic (normal scale mixture)
C(h)= δ^{-λ} (K_{λ}(ν δ))^{-1} ( δ^2 + h^2 )^{λ/2} K_{λ}( ν [ δ^2 + h^2 ]^{1/2} )
The parameters are such that
δ≥0, ν>0 and
λ>0,
or
δ>0, ν>0 and λ>0,
or
δ>0, ν≥0, and λ<0.
Note that this class is over-parametrised; always one
of the three parameters
ν, δ, and scale
can be eliminated in the formula. Therefore, one of these
parameters should be kept fixed in any simulation study.
The model contains as special cases the whittle
model and the cauchy
model, for
δ=0 and ν=0, respectively.
See also nonstathyperbolic
in Covariance
.
iacocesare
(non-separabel space time model)
C(h, t)=(1+\|h\|^ν+|t|^λ)^{-δ}
The parameters ν and λ take values in [1,2]; the parameters δ must be greater than or equal to half the space-time dimension.
J-Bessel
see bessel
K-Bessel
see whittle
and matern
linear with sill
See power
(a=1
there).
lgd1
(local-global distinguisher)
C(h)= 1-β^{-1}{α+β}|h|^{α}, |h|≤ 1 and α^{-1}{α+β}|h|^{-β}, |h|> 1
Here β>0 and α is in (0,(3 - d)/2] for dimension d=1,2. The random field has fractal dimension d + 1 - α/2 and Hurst coefficient 1 -β/2 for β \in (0,1]
matern (normal scale mixture)
C(x)=W_a(x) = 2^{1-ν} Γ(ν)^{-1} (√{2 ν} x)^ν K_ν(√{2 ν}x)
The parameter ν is positive.
This is the model of choice if the smoothness of a random field is to
be parametrised: if ν > m then the
graph is m times differentiable.
In contrast to the whittle
model
this model separates the effects of the scaling parameter and the
shape parameter. For ν=0.5 we get the exponential
model; for ν=∞ we get C(x) = \exp(0.5 x^2).
The model C(x √{2}) equals the Handcock-Wallis (1994) parameterisation.
The model allows further to replace nu by 1/ν,
setting the second parameter invnu=TRUE
.
See also whittle
, and
nonstatwhittle
in Covariance
.
M
and see 'sophisticated'
mastein
see 'sophisticated'
mixed
see 'sophisticated'
nugget
C(h)=1_{0}(h)
If the model is used in param
-definition mode,
either param[2]
, the variance
,
or param[3]
, the nugget
, must be zero.
If the model is used in the list-definition mode,
the anisotropy matrix must be given in an anisotropic
context, but not
the scale parameter in an isotropic context.
See also sophisticated
.
penta
C(x)= 1 - 22/3 x^2 +33 x^4 - 77/2 x^5 + 33/2 x^7 - 11/2 x^9 + 5/6 x^11 if 0<=x<=1, 0 otherwise
valid only for dimensions less than or equal to 3. This is a 4 times differentiable covariance functions with compact support.
power
C(x)= (1-x)^a 1_{[0,1]}(x)
This covariance function is valid for dimension d if a ≥ (d+1)/2. For a=1 we get the well-known triangle (or tent) model, which is valid on the real line, only.
powered exponential
See stable
.
qexponential
C(x)= ( 2 e^{-x} - α e^{-2x} ) / ( 2 - α )
The parameter α takes values in [0,1].
rational
and see 'sophisticated'
spherical
C(x)=≤ft(1- 1.5 x+0.5 x^3\right) 1_{[0,1]}(x)
This isotropic covariance function is valid only for dimensions less than or equal to 3.
stable
C(x)=\exp≤ft(-x^α\right)
The parameter α is in (0,2].
See exponential
and gaussian
for special cases.
Stein
and see 'sophisticated'
steinst1
and see 'sophisticated'
symmetric stable
See stable
.
tbm2
and see 'sophisticated'
tbm3
and see 'sophisticated'
tent model
See power
.
triangle
See power
.
wave
C(x)=sin(x)/x if x>0 and C(0)=1
This isotropic covariance function is valid only for dimensions less
than or equal to 3.
It is a special case of the bessel
model
(for a=0.5).
whittle (normal scale mixture)
C(x)=W_ν(x) = 2^{1-ν} Γ(ν)^{-1} x^ν K_ν(x)
The parameter ν is positive.
This is the model of choice if the smoothness of a random field is to
be parametrised: if ν > m then the
graph is m times differentiable.
The model is a special case of the
hyperbolic
model (for c=0 there).
See also nonstWM
in sophisticated.
Let \code{cov} be a model given in standard notation. Then the covariance model applied with arbitrary variance and scale equals
variance * cov( (.)/scale).
The parameters can be passed by the vector param
,
param=c(mean, variance, nugget, scale, ...)
.
Here ‘...’ stands for additional parameters such as ν
in the whittle
model.
In case a model has several parameters, as in hyperbolic
,
the parameters must be given in the sequence they are explained
aboved. However, it is strongly recommended to use the list
notation explained in sophisticated
. The list
definition available in RandomFields V 1.x, is depreciated!
For a given covariance function cov the variogram γ equals
γ(x) = cov(0) - cov(x).
Note:
The value of the covariance function or variogram
depends also on
RFparameters
()$PracticalRange
. If the latter is
TRUE
and the covariance model is isotropic
then the covariance function is internally
rescaled such that cov(1)~=0.05 for standard
parameters (scale=1
).
Some models allow certain parameter combinations only for certain
dimensions. As any model valid in d dimensions is also valid in 1
dimension, the default in CovarianceFct
and Variogram
is dim=1
.
CovarianceFct
returns a vector of values of the covariance
function.
Variogram
returns a vector of values of the variogram model.
CovMatrix
return a covariance matrix. Here a matrix of
of coordinates (x
) or a vector or a matrix of Distances
is expected.
CovMatrix
allows also for variogram models. Then negative of
variogram matrix is returned.
Martin Schlather, martin.schlather@math.uni-goettingen.de http://www.stochastik.math.uni-goettingen.de/~schlather
Overviews:
Chiles, J.-P. and Delfiner, P. (1999) Geostatistics. Modeling Spatial Uncertainty. New York: Wiley.
Gneiting, T. and Schlather, M. (2004) Statistical modeling with covariance functions. In preparation.
Schlather, M. (1999) An introduction to positive definite functions and to unconditional simulation of random fields. Technical report ST 99-10, Dept. of Maths and Statistics, Lancaster University.
Schlather, M. (2002) Models for stationary max-stable random fields. Extremes 5, 33-44.
Yaglom, A.M. (1987) Correlation Theory of Stationary and Related Random Functions I, Basic Results. New York: Springer.
Wackernagel, H. (2003) Multivariate Geostatistics. Berlin: Springer, 3nd edition.
Cauchy models, generalisations and extensions
Gneiting, T. and Schlather, M. (2004) Stochastic models which separate fractal dimension and Hurst effect. SIAM review 46, 269-282.
Dagum model
Porcu, E., Zini, A. and Pini, R. (2007) Modelling spatio-temporal data: A new variogram and covariance structure proposal Stats. Probab. Lett., 77, 83-89.
Berg, C., Mateu, J. and Porcu, E. (2008) The Dagum family of isotropic correlation functions Bernoulli, 14, 1134-1149.
Generalised fractal Brownian motion
Gneiting, T. (2002) Nonseparable, stationary covariance functions for space-time data, JASA 97, 590-600.
Gneiting's models
Gneiting, T. (1999) Correlation functions for atmospheric data analysis. Q. J. Roy. Meteor. Soc., Part A 125, 2449-2464.
Holeeffect model
Zastavnyi, V.P. (1993) Positive definite functions depending on a norm. Russian Acad. Sci. Dokl. Math. 46, 112-114.
Hyperbolic model
Shkarofsky, I.P. (1968) Generalized turbulence space-correlation and wave-number spectrum-function pairs. Can. J. Phys. 46, 2133-2153.
fractalB
Stein, M.L. (2002) Fast and exact simulation of fractional Brownian surfaces. J. Comput. Graph. Statist. 11, 587-599.
genB
Schlather, M. (2010) On some covariance models based on normal scale mixtures. Bernoulli, 16, 780-797.
lgd
Gneiting, T. and Schlather, M. (2004) Stochastic models which separate fractal dimension and Hurst effect. SIAM review
Power model
Golubov, B.I. (1981) On Abel-Poisson type and Riesz means, Analysis Mathematica 7, 161-184.
Zastavnyi, V.P. (2000) On positive definiteness of some functions, J. Multiv. Analys. 73, 55-81.
sophisticated
,
EmpiricalVariogram
,
GetModel
,
GetPracticalRange
,
parameter.range
,
RandomFields
,
RFparameters
,
ShowModels
.
PrintModelList() x <- 0:100 ## the following five model definitions are the same! ## ## (1) very traditional form (cv <- CovarianceFct(x, model="bessel", param=c(NA,2,1,5,0.5))) plot(x, cv) ## (2) above model in the very general list definition model <- list("+", list("$", var=2, scale=5, list("bessel", 0.5)), list("nugget")) cv <- CovarianceFct(x, model=model) points(x, cv, col="red", pch=20) ## no differnce to first ## (3) nested model definition ## this kind of definiton models is depreciated from Version 2.0 on cv <- CovarianceFct(x, model="bessel", param=rbind(c(2, 5, 0.5), c(1, 0, 0))) points(x, cv, col="blue", pch=20, cex=0.5) ## (4) anisotropic notation model <- list("+", list("$", var=2, aniso=as.matrix(0.2), list("bessel", nu=0.5) ), list("nugget") ) cv <- CovarianceFct(as.matrix(x), model=model) points(x, cv, col="green", pch=4) ## Depreciated list defintions in Version 1.x ## this way of defining a model still works, but ## is not supported anymore ## (isotropic version) model <- list(list(model="bessel", var=2, kappa=0.5, scale=5), "+", list(model="nugget", var=1, scale=1)) cv <- CovarianceFct(x, model=model) points(x, cv, col="black", pch=5)