inla.matern.cov.RdCalculates covariance and correlation functions for Matern models and related oscillating SPDE models, on \(R^d\) and on the sphere, \(S^2\).
inla.matern.cov(nu, kappa, x,
d = 1,
corr = FALSE,
norm.corr = FALSE,
theta,
epsilon = 1e-08)
inla.matern.cov.s2(nu, kappa, x,
norm.corr = FALSE,
theta = 0)The Matern smoothness parameter.
The spatial scale parameter.
Distance values.
Space dimension; the domain is \(R^d\).
If TRUE, calculate correlations, otherwise calculate
covariances. Only used for pure Matern models
(i.e. with \(\theta=0\)).
If TRUE, normalise by the estimated variance, giving
approximate correlations.
Oscillation strength parameter.
Tolerance for detecting points close to distance zero.
On \(R^d\), the models are defined by the spectral density given by $$S(w) = \frac{1}{(2\pi)^d (\kappa^4 + 2 \kappa^2 \cos(\pi \theta) |w|^2 + |w|^4)^{(\nu + d/2)/2}} $$
On \(S^2\), the models are defined by the spectral coefficients $$S(k) = \frac{2k+1}{4\pi (\kappa^4 + 2 \kappa^2 \cos(\pi \theta) k(k+1) + k^2(k+1)^2)^{(\nu + 1)/2}} $$