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

View source: R/cgeneric_treepcor.R

cgeneric_treepcorR Documentation

Build an cgeneric for treepcor())

Description

This creates an cgeneric (see INLAtools::cgeneric()) containing the necessary data to implement the penalized complexity prior for a correlation matrix considering a three as proposed in Sterrantino et. al. 2025 \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1007/s10260-025-00788-y")}.

Usage

cgeneric_treepcor(
  model,
  lambda,
  sigma.prior.reference,
  sigma.prior.probability,
  ...
)

Arguments

model

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.

...

additional arguments passed on to INLAtools::cgenericBuilder().

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

cgeneric/cgeneric object.

See Also

treepcor() and INLAtools::cgeneric()


graphpcor documentation built on March 23, 2026, 9:07 a.m.