Function to generate isotropic covariance models or to add an isotropic covariance model to an existing isotropic model.
covmodel(modelname, mev, nugget,variance, scale, parameter, add.covmodel)# S3 method for covmodel
print(x, ...)
an object of the class covmodel
that defines a covariance model.
a character scalar with the name of an isotropic
covariance model, see Details for a list of implemented models. A
call of covmodel()
without any function argument displays a table
with all available models and their parameters, see Examples.
a numeric scalar, variance of the measurement error.
a numeric scalar, variance of microstructure white noise process with range smaller than the minimal distance between any pair of support data.
a numeric scalar, partial sill of the covariance model.
a numeric scalar, scale ("range") parameter of the covariance model.
a numeric vector of further covariance parameters, missing
for some model like nugget
, spherical
or gauss
, etc,
see Details. If a model has several extra parameters, say
a
, b
, ... then they must be given as c(a, b, ...)
.
an object of the class covmodel
that is added to
the covariance model defined by modelname
(see examples)
a covariance model generated by covmodel
further printing arguments
Christoph Hofer, christoph.hofer@alumni.ethz.ch
The name and parametrisation of the covariance models originate from the
function CovarianceFct
of the archived package RandomFields,
version 2.0.71.
The following isotropic covariance functions are implemented (equations
taken from help page of function CovarianceFct
of archived package
RandomFields, version 2.0.71, note that the variance and range
parameters are equal to 1 in the following formulae and \(h\) is the
lag distance.):
bessel
$$C(h)=2^a \Gamma(a+1)h^{-a} J_a(h)$$
For a 2-dimensional region, the parameter \(a\) must be greater than
or equal to 0.
cauchy
$$C(h)=\left(1+h^2\right)^{-a}$$
The parameter \(a\) must be positive.
cauchytbm
$$C(h)= (1+(1-b/3)h^a)(1+h^a)^{(-b/a-1)}$$
The parameter \(a\) must be in (0,2] and \(b\)
positive.
The model is valid for 3 dimensions.
It allows for simulating random fields where
fractal dimension and Hurst coefficient can be chosen
independently.
circular
$$C(h)=
\left(1-\frac 2\pi
\left(h \sqrt{1-h^2} +
\arcsin(h)\right)\right)
1_{[0,1]}(h)$$
This isotropic covariance function is valid only for dimensions
less than or equal to 2.
constant
$$C(h)=1$$
cubic
$$C(h)=(1- 7h^2+8.75h^3-3.5h^5+0.75 h^7)1_{[0,1]}(h)$$
This model is valid only for dimensions less than or equal to 3.
It is a 2 times differentiable covariance functions with compact
support.
dampedcosine
(hole effect model)
$$C(h)= e^{-a h} \cos(h)$$
This model is valid for 2 dimensions iff \(a \ge 1\).
exponential
$$C(h)=e^{-h}$$
This model is a special case of the whittle
model
(for \(a=0.5\))
and the stable
model (for \(a = 1\)).
gauss
$$C(h)=e^{-h^2}$$
This model is a special case of the stable
model
(for \(a=2\)).
See gneiting
for an alternative model that does not have
the disadvantages of the Gaussian model.
gencauchy
(generalised cauchy
)
$$C(h)= \left(1+h^a\right)^{(-b/a)}$$
The parameter \(a\) must be in (0,2] and \(b\)
positive.
This model allows for random fields where
fractal dimension and Hurst coefficient can be chosen
independently.
gengneiting
(generalised gneiting
)
If \(a=1\) and let \(\beta = b+1\) then
$$C(h)=\left(1+\beta h\right) (1-h)^{\beta}
1_{[0,1]}(h)$$
If \(a=2\) and let \(\beta = b+2\) then
$$C(h)=\left(1+\beta h+\left(\beta ^2-1\right)h^2/3\right)
(1-h)^{\beta} 1_{[0,1]}(h)$$
If \(a=3\) and let \(\beta = b+3\) then
$$C(h)=\left(1+\beta h+\left(2\beta ^2-3\right)\frac{h^2}{5}
+\left(\beta ^2-4\right)\beta \frac{h^3}{15}\right)(1-h)^{\beta}
1_{[0,1]}(h)$$
The parameter \(a\) is a positive integer; here only the
cases \(a=1, 2, 3\) are implemented.
For two dimensional regions the parameter \(b\) must greater than or equal to
\((2 + 2a +1)/2\).
gneiting
$$C(h)=\left(1 + 8 sh + 25 (sh)^2 + 32
(sh)^3\right)(1-sh)^8 1_{[0,1]}(sh)$$
where
\(s=0.301187465825\).
This 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.
hyperbolic
$$C(h)= c^{-b}(K_{b}(a c))^{-1}
( c^2 + h^2 )^{b/2}
K_{b}(
a [ c^2 + h^2 ]^{1/2} )$$
The parameters are such that
\(c\ge0\), \(a>0\) and
\(b>0,\quad\)
or
\(c>0\), \(a>0\) and \(b=0,\quad\)
or
\(c>0\), \(a\ge0\), and \(b<0\).
Note that this class is over-parametrised; always one
of the three parameters
\(a\), \(c\), and scale
can be eliminated in the formula.
lgd1
(local-global distinguisher)
$$C(h)=
1 - \frac{b}{a+b} h^{a}, h \le 1 \qquad \hbox{and} \qquad
\frac{a}{a+b} h^{-b}, h > 1
$$
Here \(b>0\) and \(a\) msut be in
\((0,0.5]\).
The random field has for 2-dimensional regions fractal dimension
\(3 - a/2\)
and Hurst coefficient \(1 -b/2\) for
\(b \in (0,1]\)
matern
$$C(h)= 2^{1-a} \Gamma(a)^{-1}
(\sqrt{2 a} h)^a K_a(\sqrt{2 a}h)$$
The parameter \(a\) must be positive.
This is the model of choice if the smoothness of a random field is to
be parametrised: if \(a > m\) then the
graph is \(m\) times differentiable.
nugget
$$C(h)=1_{[0]}(h)$$
penta
$$C(h)= \left(1 - \frac{22}3 h^2 +33 h^4 -
\frac{77}2 h^5 + \frac{33}2
h^7 -\frac{11}2 h^9 + \frac 56 h^{11}
\right)1_{[0,1]}(h)$$
valid only for dimensions less than or equal to 3.
This is a 4 times differentiable covariance functions with compact
support.
power
$$C(h)= (1-h)^a 1_{[0,1]}(h)$$
This covariance function is valid for 2 dimensions iff
\(a \ge 1.5\).
For \(a=1\) we get the well-known triangle (or tent)
model, which is valid on the real line, only.
qexponential
$$C(h)= ( 2 e^{-h} - a e^{-2x} ) / ( 2 - a )$$
The parameter \(a\) must be in \([0,1]\).
spherical
$$C(h)=\left(1- 1.5 h+0.5 h^3\right) 1_{[0,1]}(h)$$
This covariance function is valid only for dimensions
less than or equal to 3.
stable
$$C(h)=\exp\left(-h^a\right)$$
The parameter \(a\) must be in \((0,2]\).
See exponential
and gaussian
for special cases.
wave
$$C(h)=\frac{\sin h}{h}, \quad h>0 \qquad \hbox{and } \qquad 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
$$C(h) = 2^{1-a} \Gamma(a)^{-1} h^a
K_a(h)$$
The parameter \(a\) must be positive.
This is the model of choice if the smoothness of a random field is to
be parametrised: if \(a > m\) then the
graph is \(m\) times differentiable.
The default values of the arguments
mev
,
nugget
,
variance
and scale
are eq 0.
# table with all available covariance models and their
# parameters
covmodel()
# exponential model without a measurement error and without a nugget,
# partial sill = 10, scale parameter = 15
covmodel(modelname = "exponential", variance = 10, scale = 15)
# exponential model with a measurement error ( mev = 0.5) and a
# nugget (nugget = 2.1), exponential partial sill (variance = 10)
# and scale parameter = 15
covmodel(modelname = "exponential", mev = 0.5, nugget = 2.1,
variance = 10, scale = 15)
Run the code above in your browser using DataLab