folded.matern.covariance.2d {rSPDE} | R Documentation |
The 2d folded Matern covariance function
Description
folded.matern.covariance.2d
evaluates the 2d
folded Matern covariance function over an interval
[0,L]\times [0,L]
.
Usage
folded.matern.covariance.2d(
h,
m,
kappa,
nu,
sigma,
L = 1,
N = 10,
boundary = c("neumann", "dirichlet", "periodic", "R2")
)
Arguments
h , m |
Vectors with two coordinates. |
kappa |
Range parameter. |
nu |
Shape parameter. |
sigma |
Standard deviation. |
L |
The upper bound of the square |
N |
The truncation parameter. |
boundary |
The boundary condition. The possible conditions
are |
Details
folded.matern.covariance.2d
evaluates the 1d folded
Matern covariance function over an interval
[0,L]\times [0,L]
under different boundary conditions.
For periodic boundary conditions
C_{\mathcal{P}}((h_1,h_2),(m_1,m_2)) =
\sum_{k_2=-\infty}^\infty \sum_{k_1=-\infty}^{\infty}
(C(\|(h_1-m_1+2k_1L,h_2-m_2+2k_2L)\|),
for Neumann boundary conditions
C_{\mathcal{N}}((h_1,h_2),(m_1,m_2)) =
\sum_{k_2=-\infty}^\infty \sum_{k_1=-\infty}^{\infty}
(C(\|(h_1-m_1+2k_1L,h_2-m_2+2k_2L)\|)+C(\|(h_1-m_1+2k_1L,
h_2+m_2+2k_2L)\|)+C(\|(h_1+m_1+2k_1L,h_2-m_2+2k_2L)\|)+
C(\|(h_1+m_1+2k_1L,h_2+m_2+2k_2L)\|)),
and for Dirichlet boundary conditions:
C_{\mathcal{D}}((h_1,h_2),(m_1,m_2)) = \sum_{k_2=-\infty}^\infty
\sum_{k_1=-\infty}^{\infty} (C(\|(h_1-m_1+2k_1L,h_2-m_2+2k_2L)\|)-
C(\|(h_1-m_1+2k_1L,h_2+m_2+2k_2L)\|)-C(\|(h_1+m_1+2k_1L,
h_2-m_2+2k_2L)\|)+C(\|(h_1+m_1+2k_1L,h_2+m_2+2k_2L)\|)),
where C(\cdot)
is the Matern covariance function:
C(h) = \frac{\sigma^2}{2^{\nu-1}\Gamma(\nu)}
(\kappa h)^\nu K_\nu(\kappa h).
We consider the truncation for k_1,k_2
from -N
to N
.
Value
The correspoding covariance.
Examples
h <- c(0.5, 0.5)
m <- c(0.5, 0.5)
folded.matern.covariance.2d(h, m, kappa = 10, nu = 1 / 5, sigma = 1)