Creates an INLA object for a stationary Matern model with general smoothness parameter.
rspde.matern(
mesh,
nu.upper.bound = NULL,
rspde.order = 1,
nu = NULL,
B.sigma = matrix(c(0, 1, 0), 1, 3),
B.range = matrix(c(0, 0, 1), 1, 3),
parameterization = c("spde", "matern", "matern2"),
B.tau = matrix(c(0, 1, 0), 1, 3),
B.kappa = matrix(c(0, 0, 1), 1, 3),
start.nu = NULL,
start.theta = NULL,
prior.nu = NULL,
theta.prior.mean = NULL,
theta.prior.prec = 0.1,
prior.std.dev.nominal = 1,
prior.range.nominal = NULL,
prior.kappa.mean = NULL,
prior.tau.mean = NULL,
start.lstd.dev = NULL,
start.lrange = NULL,
start.ltau = NULL,
start.lkappa = NULL,
prior.theta.param = c("theta", "spde"),
prior.nu.dist = c("beta", "lognormal"),
nu.prec.inc = 1,
type.rational.approx = c("brasil", "chebfun", "chebfunLB"),
debug = FALSE,
shared_lib = "detect",
...
)
An INLA model.
The mesh to build the model. It can be an inla.mesh
or
an inla.mesh.1d
object. Otherwise, should be a list containing elements d, the dimension, C, the mass matrix,
and G, the stiffness matrix.
Upper bound for the smoothness parameter. If NULL
, it will be set to 2.
The order of the covariance-based rational SPDE approach. The default order is 1.
If nu is set to a parameter, nu will be kept fixed and will not
be estimated. If nu is NULL
, it will be estimated.
Matrix with specification of log-linear model for \(\sigma\) (for 'matern' parameterization) or for \(\sigma^2\) (for 'matern2' parameterization). Will be used if parameterization = 'matern'
or parameterization = 'matern2'
.
Matrix with specification of log-linear model for \(\rho\), which is a range-like parameter (it is exactly the range parameter in the stationary case). Will be used if parameterization = 'matern'
or parameterization = 'matern2'
.
Which parameterization to use? matern
uses range, std. deviation and nu (smoothness). spde
uses kappa, tau and nu (smoothness). matern2
uses range-like (1/kappa), variance and nu (smoothness). The default is spde
.
Matrix with specification of log-linear model for \(\tau\). Will be used if parameterization = 'spde'
.
Matrix with specification of log-linear model for \(\kappa\). Will be used if parameterization = 'spde'
.
Starting value for nu.
Starting values for the model parameters. In the stationary case, if parameterization='matern'
, then theta[1]
is the std.dev and theta[2]
is the range parameter.
If parameterization = 'spde'
, then theta[1]
is tau
and theta[2]
is kappa
.
a list containing the elements mean
and prec
for beta distribution, or loglocation
and logscale
for a
truncated lognormal distribution. loglocation
stands for
the location parameter of the truncated lognormal distribution in the log
scale. prec
stands for the precision of a beta distribution.
logscale
stands for the scale of the truncated lognormal
distribution on the log scale. Check details below.
A vector for the mean priors of theta
.
A precision matrix for the prior of theta
.
Prior std. deviation to be used for the priors and for the starting values.
Prior range to be used for the priors and for the starting values.
Prior kappa to be used for the priors and for the starting values.
Prior tau to be used for the priors and for the starting values.
Starting value for log of std. deviation. Will not be used if start.ltau is non-null. Will be only used in the stationary case and if parameterization = 'matern'
.
Starting value for log of range. Will not be used if start.lkappa is non-null. Will be only used in the stationary case and if parameterization = 'matern'
.
Starting value for log of tau. Will be only used in the stationary case and if parameterization = 'spde'
.
Starting value for log of kappa. Will be only used in the stationary case and if parameterization = 'spde'
.
Should the lognormal prior be on theta
or on the SPDE parameters (tau
and kappa
on the stationary case)?
The distribution of the smoothness parameter. The current options are "beta" or "lognormal". The default is "lognormal".
Amount to increase the precision in the beta prior distribution. Check details below.
Which type of rational approximation should be used? The current types are "brasil", "chebfun" or "chebfunLB".
INLA debug argument
Which shared lib to use for the cgeneric implementation? If "detect", it will check if the shared lib exists locally, in which case it will use it. Otherwise it will use INLA's shared library. If "INLA", it will use the shared lib from INLA's installation. If 'rSPDE', then it will use the local installation (does not work if your installation is from CRAN). Otherwise, you can directly supply the path of the .so (or .dll) file.
Only being used internally.
a list
containing the elements meanlog
and
sdlog
, that is, the mean and standard deviation on the log scale.
a list containing the elements meanlog
and
sdlog
, that is, the mean and standard deviation on the log scale.
a list
containing the elements meanlog
and
sdlog
, that is, the mean and standard deviation on the log scale. Will not be used if prior.kappa is non-null.
a list
containing the elements meanlog
and
sdlog
, that is, the mean and standard deviation on the log scale. Will not be used if prior.tau is non-null.