cgeneric_LKJ: Build an 'inla.cgeneric' object to implement the LKG prior...

View source: R/cgeneric_LKJ.R

cgeneric_LKJR Documentation

Build an inla.cgeneric object to implement the LKG prior for the correlation matrix.

Description

Build an inla.cgeneric object to implement the LKG prior for the correlation matrix.

Usage

cgeneric_LKJ(n, eta, debug = FALSE, useINLAprecomp = TRUE, libpath = NULL)

Arguments

n

integer to define the size of the matrix

eta

numeric greater than 1, the 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

The parametrization uses the hypershere decomposition, as proposed in Rapisarda, Brigo and Mercurio (2007). consider \theta[k] \in [0, \infty], k=1,...,m=n(n-1)/2 from \theta[k] \in [0, \infty], k=1,...,m=n(n-1)/2 compute x[k] = pi/(1+exp(-theta[k])) organize it as a lower triangle of a n \times n matrix

| cos(x[i,j]) , j=1

B[i,j] = | cos(x[i,j])prod_{k=1}^{j-1}sin(x[i,k]), 2 <= j <= i-1

| prod_{k=1}^{j-1}sin(x[i,k]) , j=i

| 0 , j+1 <= j <= n

Result

\gamma[i,j] = -log(sin(x[i,j]))

KLD(R) = \sqrt(2\sum_{i=2}^n\sum_{j=1}^{i-1} \gamma[i,j]

Value

a inla.cgeneric, cgeneric() object.

References

Rapisarda, Brigo and Mercurio (2007). Parameterizing correlations: a geometric interpretation. IMA Journal of Management Mathematics (2007) 18, 55-73. <doi 10.1093/imaman/dpl010>


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