covmat {spam} | R Documentation |
Evaluate a covariance function.
covmat(h, theta, ... , type="sph") cov.exp(h, theta, ... , eps= getOption("spam.eps")) cov.sph(h, theta, ... , eps= getOption("spam.eps")) cov.nug(h, theta, ... , eps= getOption("spam.eps")) cov.wu1(h, theta, ... , eps= getOption("spam.eps")) cov.wu2(h, theta, ... , eps= getOption("spam.eps")) cov.wu3(h, theta, ... , eps= getOption("spam.eps")) cov.wend1(h, theta, ... , eps= getOption("spam.eps")) cov.wend2(h, theta, ... , eps= getOption("spam.eps")) cov.mat(h, theta, ... , eps= getOption("spam.eps"))
h |
object containing the lags. |
theta |
parameter of the covariance function, see ‘Details’. |
type |
covariance function specification. |
... |
arguments passed from other methods. |
eps |
tolerance level. |
covmat
is a wrapper that calls the other functions
according to the argument type
. The nomenclature is similar to
premat
The parametrization is (range, partial- sill, [smoothness = 1], [nugget = 0]), where
only the range needs to be specified.
In case of negative parameter values, a warning is issued and the
absolute value is retained.
Although more cryptic, having all arguments as a single vector
simplifies optimization with optim
.
Currently, the functions distinguish between a sparse spam
object h
and any other numeric type. In the future, this might
change and appropriate methods will be implemented.
Covariance function evaluated on h
.
Reinhard Furrer
Any classical book about geostatistics.
locs <- cbind(runif(10),runif(10)) h <- nearest.dist(locs, delta=.3) Sigma <- cov.sph(h, c(.3, 1, .1)) ## Not run: h <- seq(0, to=1, length.out=100) plot( h, cov.exp(h, c(1/3,1)), type='l', ylim=c(0,1)) type <- c("sph","wendland1","wendland2","wu1","wu2","wu3") for (i in 1:6) lines( h, covmat(h, 1, type=type[i]), col=i+1) legend('topright',legend=type, col=2:7, lty=1) ## End(Not run)