cgeneric_LKJ | R Documentation |
inla.cgeneric
object to implement the
LKG prior for the correlation matrix.Build an inla.cgeneric
object to implement the
LKG prior for the correlation matrix.
cgeneric_LKJ(n, eta, debug = FALSE, useINLAprecomp = TRUE, libpath = NULL)
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. |
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]
a inla.cgeneric
, cgeneric()
object.
Rapisarda, Brigo and Mercurio (2007). Parameterizing correlations: a geometric interpretation. IMA Journal of Management Mathematics (2007) 18, 55-73. <doi 10.1093/imaman/dpl010>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.