Skip to contents

Computes the precision matrix for a rational approximation of the Matern covariance on intervals.

Usage

matern.rational.precision(
  loc,
  order,
  nu,
  kappa,
  sigma,
  type_rational = "brasil",
  type_interp = "spline",
  equally_spaced = FALSE,
  ordering = c("field", "location")
)

Arguments

loc

Locations at which the precision is evaluated

order

Order of the rational approximation

nu

Smoothness parameter

kappa

Range parameter

sigma

Standard deviation

type_rational

Method used to compute the coefficients of the rational approximation.

type_interp

Interpolation method for the rational coefficients.

equally_spaced

Are the locations equally spaced?

ordering

Return the matrices ordered by field or by location?

Value

A list containing the precision matrix Q of the process and its derivatives if they exist, and a matrix A that extracts the elements corresponding to the process.

Examples

h <- seq(from = 0, to = 1, length.out = 100)
cov.true <- matern.covariance(h, kappa = 10, sigma = 1, nu = 0.8)
Q.approx <- matern.rational.precision(h, kappa = 10, sigma = 1, nu = 0.8, order = 2)
cov.approx <- Q.approx$A%*%solve(Q.approx$Q,Q.approx$A[1,])

plot(h, cov.true)
lines(h, cov.approx, col = 2)