theta2correl | R Documentation |
Build the correlation matrix parametrized from the hypershere decomposition, see details.
theta2correl(theta, fromR = TRUE)
theta2gamma2L(theta, fromR = TRUE)
rcorrel(p, lambda)
theta |
numeric vector with length equal n(n-1)/2 |
fromR |
logical indicating if theta is in R.
If FALSE, assumes |
p |
integer to specify the matrix dimension |
lambda |
numeric as the penalization parameter. If missing it will be assumed equal to zero. The lambda=0 case means no penalization and a random correlation matrix will be drawn. Please see section 6.2 of the PC-prior paper, Simpson et. al. (2017), for details. |
The hypershere decomposition, as proposed in
Rapisarda, Brigo and Mercurio (2007)
consider \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 correlation matrix
Lower triangular n x n matrix
theta2gamma2L()
: Build a lower triangular matrix from a parameter vector.
See details.
rcorrel()
: Drawn a random sample correlation matrix
Rapisarda, Brigo and Mercurio (2007). Parameterizing correlations: a geometric interpretation. IMA Journal of Management Mathematics (2007) 18, 55-73. <doi 10.1093/imaman/dpl010>
Simspon et. al. (2017). Penalising Model Component Complexity: A Principled, Practical Approach to Constructing Priors. Statist. Sci. 32(1): 1-28 (February 2017). <doi: 10.1214/16-STS576>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.