folded.matern.covariance.2d: The 2d folded Matern covariance function

View source: R/util.R

folded.matern.covariance.2dR 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 [0,L]\times [0,L]. By default, L=1.

N

The truncation parameter.

boundary

The boundary condition. The possible conditions are "neumann" (default), "dirichlet", "periodic" or "R2".

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)) = ∑_{k_2=-∞}^∞ ∑_{k_1=-∞}^{∞} (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)) = ∑_{k_2=-∞}^∞ ∑_{k_1=-∞}^{∞} (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)) = ∑_{k_2=-∞}^∞ ∑_{k_1=-∞}^{∞} (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{σ^2}{2^{ν-1}Γ(ν)} (κ h)^ν K_ν(κ 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)


rSPDE documentation built on Sept. 17, 2022, 1:05 a.m.