fractional.operators {rSPDE} | R Documentation |
Rational approximations of fractional operators
Description
fractional.operators
is used for computing an approximation,
which can be used for inference and simulation, of the fractional SPDE
Here is a differential operator,
is
the fractional power,
is a positive scalar or vector that
scales the variance of the solution
, and
is white noise.
Usage
fractional.operators(L, beta, C, scale.factor, m = 1, tau = 1)
Arguments
L |
A finite element discretization of the operator |
beta |
The positive fractional power. |
C |
The mass matrix of the finite element discretization. |
scale.factor |
A constant |
m |
The order of the rational approximation, which needs to be a positive integer. The default value is 1. Higer values gives a more accurate approximation, which are more computationally expensive to use for inference. Currently, the largest value of m that is implemented is 4. |
tau |
The constant or vector that scales the variance of the solution. The default value is 1. |
Details
The approximation is based on a rational approximation of the fractional operator, resulting in an approximate model on the form
where are non-fractional operators defined in terms of
polynomials
for
. The order of
is given by
m
and the order of is
where
is the integer part of
if
and
otherwise.
The discrete approximation can be written as where
and
.
Note that the matrices
and
may be be ill-conditioned
for
. In this case, the methods in
operator.operations()
should be used for operations involving the matrices, since these methods
are more numerically stable.
Value
fractional.operators
returns an object of class "rSPDEobj".
This object contains the following quantities:
Pl |
The operator |
Pr |
The operator |
C |
The mass lumped mass matrix. |
Ci |
The inverse of |
m |
The order of the rational approximation. |
beta |
The fractional power. |
type |
String indicating the type of approximation. |
Q |
The matrix |
type |
String indicating the type of approximation. |
Pl.factors |
List with elements that can be used to assemble |
Pr.factors |
List with elements that can be used to assemble |
See Also
matern.operators()
, spde.matern.operators()
,
matern.operators()
Examples
# Compute rational approximation of a Gaussian process with a
# Matern covariance function on R
kappa <- 10
sigma <- 1
nu <- 0.8
# create mass and stiffness matrices for a FEM discretization
x <- seq(from = 0, to = 1, length.out = 101)
fem <- rSPDE.fem1d(x)
# compute rational approximation of covariance function at 0.5
tau <- sqrt(gamma(nu) / (sigma^2 * kappa^(2 * nu) *
(4 * pi)^(1 / 2) * gamma(nu + 1 / 2)))
op <- fractional.operators(
L = fem$G + kappa^2 * fem$C, beta = (nu + 1 / 2) / 2,
C = fem$C, scale.factor = kappa^2, tau = tau
)
v <- t(rSPDE.A1d(x, 0.5))
c.approx <- Sigma.mult(op, v)
# plot the result and compare with the true Matern covariance
plot(x, matern.covariance(abs(x - 0.5), kappa, nu, sigma),
type = "l", ylab = "C(h)",
xlab = "h", main = "Matern covariance and rational approximations"
)
lines(x, c.approx, col = 2)