Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

materncov.bands

Matern correlation or covariance function approximate credible bands.


Description

Evaluate the covariance function for an inla.spde objectPlots the posterior distribution of the range, log(range), variance, or log(variance) parameter of a model's SPDE component. Can also plot Matern correlation or covariance function.

Usage

materncov.bands(
  manifold,
  dist,
  log.range,
  log.variance = NULL,
  alpha = 2,
  quantile = 0.95,
  n = 64,
  S1.L = NULL
)

Arguments

manifold

Either "R1", "S1", "R2", or "S2", from mesh$manifold, or a full inla.mesh or inla.mesh.1d object.

dist

A vector of distances at which to calculate the covariances/correlations

log.range

A scalar or a list (mean, sd), such as produced by inla.spde.result(...)$summary.log.range.nominal[[1]][c("mean","sd")]

log.variance

Either NULL, a scalar, or vector of the same type as for log.range. When NULL, the correlations are calculated instead of the covariances.

alpha

The SPDE operator order. Default 2.

quantile

The target credible probability. Default 0.95.

n

The number of parameter combinations to use for the approximation. Default 64.

S1.L

For manifold "S1", give the length of the cyclic interval

Details

Uses a Gaussian assumption for the internal model parameters, and finds a region in parameter space with approximately quantile probability.

Value

A list with estimated covariance or correlation (when log.variance is NULL) functions:

lower

An approximate lower bound for the quantile credible region

median

The function for for the approximate median parameters quantile

upper

An approximate upper bound for the quantile credible region

Author(s)

Finn Lindgren Finn.Lindgren@ed.ac.uk


inlabru

Bayesian Latent Gaussian Modelling using INLA and Extensions

v2.3.1
GPL (>= 2)
Authors
Finn Lindgren [aut, cre, cph] (<https://orcid.org/0000-0002-5833-2011>, Finn Lindgren continued development of the main code), Fabian E. Bachl [aut, cph] (Fabian Bachl wrote the main code), David L. Borchers [ctb, dtc, cph] (David Borchers wrote code for Gorilla data import and sampling, multiplot tool), Daniel Simpson [ctb, cph] (Daniel Simpson wrote the basic LGCP sampling method), Lindesay Scott-Howard [ctb, dtc, cph] (Lindesay Scott-Howard provided MRSea data import code), Seaton Andy [ctb] (Andy Seaton provided testing and bugfixes)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.