Calculates the spatial variance-covariance matrix for a selection of correlation functions.
spcovariance(...)# S3 method for formula
spcovariance(
formula,
data,
subset,
corrfcn,
ssq,
phi,
omg,
kappa,
longlat = FALSE,
...
)
# S3 method for numeric
spcovariance(x, corrfcn, ssq, phi, omg, kappa, ...)
# S3 method for dist
spcovariance(x, corrfcn, ssq, phi, omg, kappa, ...)
For a formula input, a variance-covariance matrix. For a numeric input, an object of the the same dimensions as its first input.
Further arguments. Not currently in use.
A formula of the form ~ Xcoord + Ycoord
specifying the sampled locations.
An optional data frame containing the variables in the model.
An optional set of indices. The covariance will be calculated for those coordinates only.
The correlation function to use.
The partial sill parameter.
The spatial range parameter.
The relative nugget parameter.
The spatial smoothness parameter.
How to compute the distance between locations. If
FALSE, Euclidean distance, if TRUE Great Circle
distance. See spDists.
A numerical object of distances.