cgeneric_treepcor: Build an 'cgeneric' for 'treepcor()')

View source: R/cgeneric_treepcor.R

cgeneric_treepcorR Documentation

Build an cgeneric for treepcor())

Description

This set the necessary data to implement the penalized complexity prior for a correlation matrix considering a three as proposed in Sterrantino et. al. 2025

Usage

cgeneric_treepcor(
  graph,
  lambda,
  sigma.prior.reference,
  sigma.prior.probability,
  debug = FALSE,
  useINLAprecomp = TRUE,
  libpath = NULL
)

Arguments

graph

object of class treepcor for the model specification.

lambda

the lambda parameter for the graph correlation prior.

sigma.prior.reference

a vector with the reference values to define the prior for the standard deviation parameters.

sigma.prior.probability

a vector with the probability values to define the prior for the standard deviation parameters.

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

The correlation prior as in the paper depends on the lambda value. The prior for each sigma_i is the Penalized-complexity prior which can be defined from the following probability statement P(sigma > U) = a. where "U" is a reference value and "a" is a probability. The values "U" and probabilities "a" for each sigma_i are passed in the sigma.prior.reference and sigma.prior.probability arguments. If a=0 then U is taken to be the fixed value of the corresponding sigma. E.g. if there are three sigmas in the model and one supply sigma.prior.reference = c(1, 2, 3) and sigma.prior.probability = c(0.05, 0.0, 0.01) then the sigma is fixed to 2 and not estimated.

Value

a inla.cgeneric, cgeneric() object.

See Also

treepcor() and cgeneric()


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