View source: R/FUN_covariance_spatial.R
| maternm | R Documentation |
Matern spatial covariance structure. The returned dimensionless covariance shape is intended for use inside vsm, which supplies the single overall variance scale.
maternm(x, range = NULL, nu = 0.5, fixed = c(FALSE, FALSE),
distance = NULL, anisotropy = c("none", "geometric"),
angle = pi/2, ratio = 1.5)
x |
Numeric coordinate vector or matrix/data frame whose rows give spatial coordinates. |
range |
Positive starting range parameter. If NULL, the median positive pairwise distance is used. |
nu |
Positive starting Matern smoothness parameter. |
fixed |
Logical of length one or two (range, nu), or four with geometric anisotropy (range, nu, angle, ratio); length one is recycled. |
distance |
Optional finite symmetric q by q distance matrix with zero diagonal, aligned to the unique spatial locations. |
anisotropy |
|
angle |
Starting anisotropy angle in (0, pi). |
ratio |
Starting positive anisotropy ratio. |
For distance d, the correlation is
K(d)=\frac{2^{1-\nu}}{\Gamma(\nu)}z^{\nu}K_{\nu}(z),\qquad z=\frac{\sqrt{2\nu}d}{\phi},
where \phi is range. Both range and smoothness are positive and are optimized on log scales. The implementation uses the generic R evaluator and central factor-level numerical derivatives. Repeated coordinate rows are mapped to the same covariance level.
A list containing the incidence/design matrix in Z and a compiled CovarianceFactor v2 descriptor in covFactor, for use inside vsm.
metricm, sar, car, vsm.
## Not run:
vsm(maternm(cbind(xcoord,ycoord)), ism(genotype))
vsm(maternm(time), ism(id))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.