scale_gmrf_precision: Scale of GMRF precision matrix

View source: R/car.R

scale_gmrf_precisionR Documentation

Scale of GMRF precision matrix

Description

This function scales the precision matrix of a GMRF such that the geometric mean of the marginal variance is one.

Usage

scale_gmrf_precision(
  Q,
  A = matrix(1, ncol = ncol(Q)),
  eps = sqrt(.Machine$double.eps)
)

Arguments

Q

Precision matrix for a GMRF.

A

Linear constraint for Q.

eps

Value of the small constant added to the diagonal of Q for invertibility.

Details

This implements the same thing as INLA::inla.scale.model. The marginal variance of each connected component is one.


mrc-ide/naomi documentation built on April 10, 2024, 2:13 p.m.