CovMat {RcppCensSpatial} | R Documentation |
Covariance matrix for spatial models
Description
It computes the spatial variance-covariance matrix considering exponential, gaussian, matérn, or power exponential correlation function.
Usage
CovMat(phi, tau2, sig2, coords, type = "exponential", kappa = NULL)
Arguments
phi |
spatial scaling parameter. |
tau2 |
nugget effect parameter. |
sig2 |
partial sill parameter. |
coords |
2D spatial coordinates of dimensions |
type |
type of spatial correlation function: |
kappa |
parameter for some spatial correlation functions. For exponential
and gaussian |
Details
The spatial covariance matrix is given by
,
where is the partial sill,
is the spatial scaling
parameter,
is known as the nugget effect in the geostatistical
framework,
is the
correlation matrix computed from a
correlation function, and
is the
identity matrix.
The spatial correlation functions available are:
- Exponential:
,
- Gaussian:
,
- Matérn:
,
- Power exponential:
,
where is the Euclidean distance between two observations,
is the gamma function,
is the smoothness parameter,
and
is the modified Bessel function of the second kind of order
.
Value
An spatial covariance matrix.
Author(s)
Katherine L. Valeriano, Alejandro Ordoñez, Christian E. Galarza, and Larissa A. Matos.
See Also
dist2Dmatrix
, EM.sclm
, MCEM.sclm
, SAEM.sclm
Examples
set.seed(1000)
n = 20
coords = round(matrix(runif(2*n, 0, 10), n, 2), 5)
Cov = CovMat(phi=5, tau2=0.8, sig2=2, coords=coords, type="exponential")