GMRF_structure: Set a GMRF structure for a generic model component

View source: R/GMRF_extension.R

GMRF_structureR Documentation

Set a GMRF structure for a generic model component

Description

This function is used to specify a (non-default) GMRF structure to pass to argument strucA of function gen.

Usage

GMRF_structure(
  type = c("default", "bym2", "leroux"),
  scale.precision = (type == "bym2"),
  prior = NULL,
  control = NULL
)

Arguments

type

one of "default", "bym2" or "leroux". The default choice corresponds to the precision matrix Q_A as specified by argument factor of gen. Type "bym2" modifies the default structure to one with covariance matrix \phi \tilde{Q}_{A}^- + (1 - \phi) I where \tilde{Q}_{A*}^- is the generalized inverse of Q_A, by default scaled such that the geometric mean of the marginal variances equals 1. Type "leroux" modifies the default structure to one with precision matrix \phi Q_A + (1 - \phi) I.

scale.precision

whether to scale the structured precision matrix. By default set to TRUE only for type "bym2".

prior

prior for the parameter phi in the "bym2" or "leroux" extension. Supported priors can be set using functions pr_fixed or pr_unif.

control

options for the Metropolis-Hastings sampler used to sample from the full conditional distribution of parameter phi in case of "bym2" or "leroux" extensions. If NULL a reasonable default configuration is used. A user can change these settings using function set_MH. Supported proposal distribution types are "RWTN", "RWN", "unif" and "beta".

Value

An environment defining the desired GMRF structure, for use by other package functions.

References

B. Leroux, X. Lei and N. Breslow (1999). Estimation of Disease Rates in Small Areas: A New Mixed Model for Spatial Dependence. In M. Halloran and D. Berry (Eds.), Statistical Models in Epidemiology, the Environment and Clinical Trials, 135-178.

A. Riebler, S.H. Sorbye, D. Simpson and H. Rue (2016). An intuitive Bayesian spatial model for disease mapping that accounts for scaling. Statistical methods in medical research, 25(4), 1145-1165.


mcmcsae documentation built on April 12, 2025, 2:25 a.m.