Skip to contents

Creates an INLA object for a stationary Matern model with general smoothness parameter.

## Usage

rspde.matern(
mesh,
nu_upper_bound = 4,
rspde_order = 2,
nu = NULL,
debug = FALSE,
prior.kappa = NULL,
prior.nu = NULL,
prior.tau = NULL,
prior.range = NULL,
prior.std.dev = NULL,
start.lkappa = NULL,
start.nu = NULL,
start.ltau = NULL,
start.lrange = NULL,
start.lstd.dev = NULL,
parameterization = c("matern", "spde"),
prior.nu.dist = c("lognormal", "beta"),
nu.prec.inc = 1,
type.rational.approx = c("chebfun", "brasil", "chebfunLB"),
shared_lib = "INLA"
)

## Arguments

mesh

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.

nu_upper_bound

Upper bound for the smoothness parameter.

rspde_order

The order of the covariance-based rational SPDE approach.

nu

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.

debug

INLA debug argument

prior.kappa

a list containing the elements meanlog and sdlog, that is, the mean and standard deviation on the log scale.

prior.nu

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.

prior.tau

a list containing the elements meanlog and sdlog, that is, the mean and standard deviation on the log scale.

prior.range

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.

prior.std.dev

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.

start.lkappa

Starting value for log of kappa.

start.nu

Starting value for nu.

start.ltau

Starting value for log of tau.

start.lrange

Starting value for log of range. Will not be used if start.lkappa is non-null.

start.lstd.dev

Starting value for log of std. deviation. Will not be used if start.ltau is non-null.

parameterization

Which parameterization to use? matern uses range, std. deviation and nu (smoothness). spde uses kappa, tau and nu (smoothness). The default is matern.

prior.nu.dist

The distribution of the smoothness parameter. The current options are "beta" or "lognormal". The default is "beta".

nu.prec.inc

Amount to increase the precision in the beta prior distribution. Check details below.

type.rational.approx

Which type of rational approximation should be used? The current types are "chebfun", "brasil" or "chebfunLB".

shared_lib

Which shared lib to use for the cgeneric implementation? 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.

An INLA model.