cgeneric_Wishart: Build an 'inla.cgeneric' to implement the Wishart prior for a...

View source: R/cgeneric_Wishart.R

cgeneric_WishartR Documentation

Build an inla.cgeneric to implement the Wishart prior for a precision matrix.

Description

Build an inla.cgeneric to implement the Wishart prior for a precision matrix.

Usage

cgeneric_Wishart(
  n,
  dof,
  R,
  debug = FALSE,
  useINLAprecomp = TRUE,
  libpath = NULL
)

Arguments

n

the size of the precision matrix

dof

degrees of freedom model parameter

R

lower triangle of the scale matrix parameter

debug

integer, default is zero, indicating the verbose level. Will be used as logical by INLA.

useINLAprecomp

logical, default is TRUE, indicating if it is to be used the shared object pre-compiled by INLA. This is not considered if 'libpath' is provided.

libpath

string, default is NULL, with the path to the shared object.

Details

For a random p\times p precision matrix Q, given the parameters d and R, respectively scalar degree of freedom and the inverse scale p\times p matrix the Wishart density is

|Q|^{(d-p-1)/2}\textrm{e}^{-tr(RQ)/2}|R|^{p/2}2^{-dp/2}\Gamma_p(n/2)^{-1}

Value

a inla.cgeneric, cgeneric() object.


graphpcor documentation built on June 8, 2025, 10:37 a.m.