Matern spatial covariance structure
maternm.RdMatern spatial covariance structure. The returned dimensionless covariance shape is intended for use inside vsm, which supplies the single overall variance scale.
Arguments
- 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
"geometric"rotates two-dimensional coordinates byangleand divides the second rotated axis byratiobefore computing distances (ASReml anisotropic Matern).- angle
Starting anisotropy angle in (0, pi).
- ratio
Starting positive anisotropy ratio.
Details
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.