precision_matrix_multivariate_spde: Compute the precision matrix for multivariate spde Matern...

View source: R/models.R

precision_matrix_multivariate_spdeR Documentation

Compute the precision matrix for multivariate spde Matern model

Description

Compute the precision matrix for multivariate spde Matern model

Usage

precision_matrix_multivariate_spde(
  p,
  mesh,
  rho,
  alpha_list = NULL,
  theta_K_list = NULL,
  variance_list = NULL,
  B_K_list = NULL,
  theta = NULL,
  Q = NULL
)

Arguments

p

dimension, should be integer and greater than 1

mesh

an fmesher::fm_mesh_2d object, mesh for build the SPDE model

rho

vector with the p(p-1)/2 correlation parameters rho_11, rho_21, rho_22, ... rho_p1, rho_p2, ... rho_p(p-1)

alpha_list

a list of SPDE smoothness parameter

theta_K_list

a list (length is p) of theta_K

variance_list

If provided, it should be a vector of length p, where the kth element corresponds to a desired variance of the kth field. The kth operator is then scaled by a constant c so that this variance is achieved in the stationary case (default no scaling)

B_K_list

a list (length is p) of B_K (non-stationary case)

theta

parameter for Q matrix (length of 1 when p=2, length of 3 when p=3)

Q

orthogonal matrix of dim p*p (provide when p > 3)

Details

The general model is defined as $D diag(L_1, ..., L_p) x = M$. D is the dependence matrix, it is paramterized by $D = Q(theta) * D_l(cor_mat)$, where $Q$ is the orthogonal matrix, and $D_l$ is matrix controls the cross-correlation. See the section 2.2 of Bolin and Wallin (2020) for exact parameterization of Dependence matrix.

Value

the precision matrix of the multivariate model

References

Bolin, D. and Wallin, J. (2020), Multivariate type G Matérn stochastic partial differential equation random fields. J. R. Stat. Soc. B, 82: 215-239. https://doi.org/10.1111/rssb.12351

Examples

library(fmesher)

# Use a small mesh so the example stays lightweight.
x <- seq(from = 0, to = 1, length.out = 6)
mesh <- fm_rcdt_2d_inla(lattice = fm_lattice_2d(x, x), extend = FALSE)

Q <- precision_matrix_multivariate_spde(
  p = 2,
  mesh = mesh,
  rho = 0.25,
  alpha_list = list(2, 2),
  theta_K_list = list(0, 0),
  variance_list = list(1, 1)
)
dim(Q)

ngme2 documentation built on May 20, 2026, 9:10 a.m.