folded.matern.covariance.2d
evaluates the 2d
folded Matern covariance function over an interval
\([0,L]\times [0,L]\).
folded.matern.covariance.2d(
h,
m,
kappa,
nu,
sigma,
L = 1,
N = 10,
boundary = c("neumann", "dirichlet", "periodic", "R2")
)
The correspoding covariance.
Vectors with two coordinates.
Range parameter.
Shape parameter.
Standard deviation.
The upper bound of the square \([0,L]\times [0,L]\).
By default, L=1
.
The truncation parameter.
The boundary condition. The possible conditions
are "neumann"
(default), "dirichlet"
,
"periodic"
or "R2"
.
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\).
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)
Run the code above in your browser using DataLab