| graph_spde {MetricGraph} | R Documentation |
'INLA' implementation of Whittle-Matérn fields for metric graphs
Description
This function creates an 'INLA' object that can be used in 'INLA' or 'inlabru' to fit Whittle-Matérn fields on metric graphs.
Usage
graph_spde(
graph_object,
alpha = 1,
stationary_endpoints = "all",
parameterization = c("matern", "spde"),
start_range = NULL,
prior_range = NULL,
start_kappa = NULL,
start_sigma = NULL,
prior_kappa = NULL,
prior_sigma = NULL,
shared_lib = "detect",
debug = FALSE
)
Arguments
graph_object |
A |
alpha |
The order of the SPDE. |
stationary_endpoints |
Which vertices of degree 1 should contain stationary boundary conditions? |
parameterization |
Which parameterization to be used? The options are 'matern' (sigma and range) and 'spde' (sigma and kappa). |
start_range |
Starting value for range parameter. |
prior_range |
a |
start_kappa |
Starting value for kappa. |
start_sigma |
Starting value for sigma. |
prior_kappa |
a |
prior_sigma |
a |
shared_lib |
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 'MetricGraph', 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. |
debug |
Should debug be displayed? |
Details
This function is used to construct a Matern SPDE model on a metric graph.
The latent field u is the solution of the SPDE
(\kappa^2 - \Delta)^\alpha u = \sigma W,
where W is Gaussian
white noise on the metric graph. This model implements exactly
the cases in which \alpha = 1 or \alpha = 2. For a finite
element approximation for general \alpha we refer the reader to the
'rSPDE' package and to the Whittle–Matérn fields with general smoothness vignette.
We also have the alternative parameterization \rho = \frac{\sqrt{8(\alpha-0.5)}}{\kappa},
which can be interpreted as a range parameter.
Let \kappa_0 and \sigma_0 be the starting values for \kappa and
\sigma, we write \sigma = \exp\{\theta_1\} and \kappa = \exp\{\theta_2\}.
We assume priors on \theta_1 and \theta_2 to be normally distributed
with mean, respectively, \log(\sigma_0) and \log(\kappa_0), and variance 10.
Similarly, if we let \rho_0 be the starting value for \rho, then
we write \rho = \exp\{\theta_2\} and assume a normal prior for \theta_2,
with mean \log(\rho_0) and variance 10.
Value
An 'INLA' object.