Function to get the precision matrix of a rSPDEobj1d object
Arguments
- object
The covariance-based rational SPDE approximation, computed using
matern.rational()
- user_loc
If non-null, update the locations where to evaluate the model.
- user_nu
If non-null, update the shape parameter of the covariance function.
- user_kappa
If non-null, update the range parameter of the covariance function.
- user_sigma
If non-null, update the standard deviation of the covariance function.
- user_range
If non-null, update the range parameter of the covariance function.
- user_tau
If non-null, update the parameter tau.
- user_m
If non-null, update the order of the rational approximation, which needs to be a positive integer.
- ordering
Return the matrices ordered by field or by location?
- ldl
Directly build the LDL factorization of the precision matrix?
- ...
Currently not used.
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. If ldl=TRUE
, the LDL factorization
is returned instead of Q
. If the locations are not ordered, the precision matrix is given for the ordered locations,
but the A
matrix returns to the original order.
Examples
# Compute the covariance-based rational approximation of a
# Gaussian process with a Matern covariance function on R
sigma <- 1
nu <- 0.8
range <- 0.2
# create mass and stiffness matrices for a FEM discretization
x <- seq(from = 0, to = 1, length.out = 101)
op_cov <- matern.rational(
loc = x, nu = nu,
range = range, sigma = sigma, m = 2,
parameterization = "matern"
)
# Get the precision matrix:
prec_matrix <- precision(op_cov)