covMaterniso: Compute the Covariance of a Matern process

View source: R/covMaterniso.R

covMaternisoR Documentation

Compute the Covariance of a Matern process

Description

Definition of the Matern Covariance function, if 2 ν is integer. For ν = 0.5 the function is also known as the exponential covariance or the Ornstein-Uhlenbeck covariance in one dimension. In general the explicit formula for the Matern Covariance for one dimensional processes, with ν s.t. ν = p + 0.5 and p integer is:

k(d) = s^2 \frac{p!}{(2p)!} exp≤ft(-\frac{√{2 ν} d}{ρ}\right) ∑_{i = 0}^p \frac{(p+i)!}{(p-i)! i!} ≤ft( \frac{√{8 ν} d}{ρ} \right)^{p-i}

with d the distance between two points x and y in R.

Usage

covMaterniso(nu, rho, sigma, x)

Arguments

nu

scalar. Value s.t. 2nu is integer. It is a smoothing paramter ν of the covariance: the larger nu, the smoother the process.

rho

scalar. Non negative range parameter ρ of the covariance.

sigma

scalar. Non negative standard deviation parameter s of the covariance.

x

vector. Vector containing the abscissa points where the Covariance is defined.

Value

d \timesd covariance matrix.

Examples

# Defintion of a Gaussian process
# with Matern Covariance

# Time domain of the Gaussian Process
M <- 50
T_domain <- seq(0, 1, length = M)

# paramteters of the Matern Covariance
nu_alpha <- 2.5
range <- 1/4
variance <- 1

# mean of the process
mu_alpha <- rep(0,M)

# covariance structure
Sig_alpha <- covMaterniso(nu_alpha, rho = range, sigma = sqrt(variance), T_domain)

# definition of the process

# alpha <- mvrnorm(mu=mu_alpha, Sigma=Sig_alpha, n=1) # if MASS is inslalled


ardeeshany/AFSSEN documentation built on Aug. 28, 2022, 2:22 p.m.