Last chance! 50% off unlimited learning
Sale ends in
cov.spatial(obj, cov.model=c("matern", "exponential", "gaussian",
"spherical", "circular", "cubic", "wave",
"power", "powered.exponential", "cauchy",
"gneiting", "gneiting.matern", "pure.nugget"),
cov.pars=stop("no cov.pars argument provided"),
kappa = 0.5)
DETAILS
for available options and expressions of the correlation
functions."matern"
, "powered.exponential"
,
"cauchy"
and "gneiting
obj
, typically a vector, matrix or array.besselK
for further details.
In the equations below the functions are valid for $\phi>0$ and $\kappa>0$, unless stated otherwise.
exponential
wave
matern
gaussian
spherical
$$\rho(h) = \left{
cubic
$$\rho(h) = \left{
power
For the power model the parameters $\sigma^2$ and
$\phi$ of the covariance function will no longer
have the interpretation as partial sill and range
as for the other models.
cauchy
gneiting
Let $\theta = \min(\frac{h}{\phi},1)$.
The Gneiting model is given by:
gneiting.matern
Let $\alpha=\phi\kappa_2$, $\rho_m(\cdot)$ denotes the $\mbox{Mat\'{e}rn}$ model
and $\rho_g(\cdot)$ the Gneiting model. Then the
$\mbox{Gneiting-Mat\'{e}rn}$ is given by
Further information about geoR can be found at:
matern
for computation of the
$\mbox{Mat\'{e}rn}$ model, besselK
for
computation of the Bessel function and
varcov.spatial
for computations related to the covariance matrix.#
# Variogram models with the same "practical" range:
#
v.f <- function(x, ...){1-cov.spatial(x, ...)}
#
curve(v.f(x, cov.pars=c(1, .2)), from = 0, to = 1,
xlab = "distance", ylab = expression(gamma(h)),
main = "variograms with equivalent "practical range"")
curve(v.f(x, cov.pars = c(1, .6), cov.model = "sph"), 0, 1,
add = TRUE, lty = 2)
curve(v.f(x, cov.pars = c(1, .6/sqrt(3)), cov.model = "gau"),
0, 1, add = TRUE, lwd = 2)
legend(0.5,.3, c("exponential", "spherical", "gaussian"),
lty=c(1,2,1), lwd=c(1,1,2))
#
# Matern models with equivalent "practical range"
# and varying smoothness parameter
#
curve(v.f(x, cov.pars = c(1, 0.25), kappa = 0.5),from = 0, to = 1,
xlab = "distance", ylab = expression(gamma(h)), lty = 2,
main = "models with equivalent "practical" range")
curve(v.f(x, cov.pars = c(1, 0.188), kappa = 1),from = 0, to = 1,
add = TRUE)
curve(v.f(x, cov.pars = c(1, 0.14), kappa = 2),from = 0, to = 1,
add = TRUE, lwd=2, lty=2)
curve(v.f(x, cov.pars = c(1, 0.117), kappa = 2),from = 0, to = 1,
add = TRUE, lwd=2)
legend(0.4,.4, c(expression(paste(kappa == 0.5, "and ",
phi == 0.250)),
expression(paste(kappa == 1, "and ", phi == 0.188)),
expression(paste(kappa == 2, "and ", phi == 0.140)),
expression(paste(kappa == 3, "and ", phi == 0.117))),
lty=c(2,1,2,1), lwd=c(1,1,2,2))
Run the code above in your browser using DataLab