Lprec | R Documentation |
Precision matrix parametrization helper functions.
Lprec(theta, p, ilowerL)
fillLprec(L, lfi)
theta2Lprec2C(theta, p, ilowerL)
theta |
numeric vector of length |
p |
numeric giving the dimention of Q.
If missing, |
ilowerL |
numeric vector as index
to (lower) L to be filled with |
L |
matrix as the lower triangle containing the Cholesky decomposition of a precision matrix |
lfi |
indicator of fill-in elements |
The precision matrix definition consider
m
parameters for the lower part of L.
If Q is dense, then m = p(p-1)/2
, else
m = length(ilowerL)
.
Then the precision is defined as
Q(\theta) = L(\theta)L(\theta)^T
matrix as the Cholesky factor of a precision matrix as the inverse of a correlation
a matrix whose elements at the lower
triangle are the filled in elements of the
Cholesky decomposition of a precision matrix
and diagonal elements as 1:p
.
fillLprec()
: Function to fill-in a Cholesky matrix
theta2Lprec2C()
: Internal function to build C
theta1 <- c(1, -1, -2)
Lprec(theta1)
theta2 <- c(0.5, -0.5, -1, -1)
Lprec(theta2, 4, c(2,4,7,12))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.