update.rSPDEobj {rSPDE} | R Documentation |
Update parameters of rSPDEobj objects
Description
Function to change the parameters of a rSPDEobj object
Usage
## S3 method for class 'rSPDEobj'
update(
object,
user_nu = NULL,
user_alpha = NULL,
user_kappa = NULL,
user_sigma = NULL,
user_range = NULL,
user_tau = NULL,
user_theta = NULL,
user_m = NULL,
mesh = NULL,
loc_mesh = NULL,
graph = NULL,
range_mesh = NULL,
parameterization = NULL,
...
)
Arguments
object |
The operator-based rational SPDE approximation,
computed using |
user_nu |
If non-null, update the shape parameter of the covariance function. |
user_alpha |
If non-null, update the fractional order. |
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_theta |
If non-null, update the parameter theta, that connects tau and kappa to the model matrices. |
user_m |
If non-null, update the order of the rational approximation, which needs to be a positive integer. |
mesh |
An optional inla mesh. Replaces |
loc_mesh |
The mesh locations used to construct the matrices C and G. This option should be provided if one wants to use the |
graph |
An optional |
range_mesh |
The range of the mesh. Will be used to provide starting values for the parameters. Will be used if |
parameterization |
If non-null, update the parameterization. Only works for stationary models. |
... |
Currently not used. |
Value
It returns an object of class "rSPDEobj. This object contains the
same quantities listed in the output of matern.operators()
.
See Also
simulate.rSPDEobj()
, matern.operators()
Examples
# Compute the operator-based rational approximation of a
# Gaussian process with a Matern covariance function on R
kappa <- 10
sigma <- 1
nu <- 0.8
range <- sqrt(8*nu)/kappa
# 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
op <- matern.operators(
loc_mesh = x, nu = nu,
range = range, sigma = sigma, d = 1, m = 2, type = "operator",
parameterization = "matern"
)
op
# Update the range parameter of the model:
op <- update(op, user_kappa = 20)
op