varcov.spatial {geoR} | R Documentation |
Computes Covariance Matrix and Related Results
Description
This function builds the covariance matrix for a set of spatial locations, given the covariance parameters. According to the input options other results related to the covariance matrix (such as decompositions, determinants, inverse. etc) can also be returned.
Usage
varcov.spatial(coords = NULL, dists.lowertri = NULL,
cov.model = "matern", kappa = 0.5, nugget = 0,
cov.pars = stop("no cov.pars argument"),
inv = FALSE, det = FALSE,
func.inv = c("cholesky", "eigen", "svd", "solve"),
scaled = FALSE, only.decomposition = FALSE,
sqrt.inv = FALSE, try.another.decomposition = TRUE,
only.inv.lower.diag = FALSE, ...)
Arguments
coords |
an |
dists.lowertri |
a vector with the lower triangle of the matrix
of distances between pairs of data points. If not provided
the argument |
cov.model |
a string indicating the type of the correlation
function. More details in the
documentation for |
kappa |
values of the additional smoothness parameter, only required by
the following correlation
functions: |
nugget |
the value of the nugget parameter |
cov.pars |
a vector with 2 elements or an |
inv |
if |
det |
if |
func.inv |
algorithm used for the decomposition and inversion of the covariance
matrix. Options are |
scaled |
logical indicating whether the covariance matrix should
be scaled. If |
only.decomposition |
logical. If |
sqrt.inv |
if |
try.another.decomposition |
logical. If |
only.inv.lower.diag |
logical. If |
... |
for naw, only for internal usage. |
Details
The elements of the covariance matrix are computed by the function
cov.spatial
. Typically this is an auxiliary function called by other
functions in the geoR package.
Value
The result is always list. The components will vary according to the input options. The possible components are:
varcov |
the covariance matrix. |
sqrt.varcov |
a square root of the covariance matrix. |
lower.inverse |
the lower triangle of the inverse of covariance matrix. |
diag.inverse |
the diagonal of the inverse of covariance matrix. |
inverse |
the inverse of covariance matrix. |
sqrt.inverse |
a square root of the inverse of covariance matrix. |
log.det.to.half |
the logarithmic of the square root of the determinant of the covariance matrix. |
Author(s)
Paulo J. Ribeiro Jr. paulojus@leg.ufpr.br,
Peter J. Diggle p.diggle@lancaster.ac.uk.
References
Further information on the package geoR can be found at:
http://www.leg.ufpr.br/geoR/.
See Also
cov.spatial
for more information on the
correlation functions; chol
, solve
,
svd
and eigen
for matrix inversion and/or decomposition.