Description Usage Arguments Value Examples
View source: R/Bayesian_Bricks.r
Use Cholesky decomposition to calculate the inverse of S, where S = A'A, A is a upper diagonal matrix. inv(S) = inv(A)inv(A)'.
1 | pdsInverse(S, returnUpper = FALSE)
|
S |
a symmetric positive definitive matrix. |
returnUpper |
logical, return inv(A) if returnUpper=TRUE,return inv(S) if returnUpper=FALSE, default FALSE. |
A matrix, the inverse of "S".
1 2 3 | Sigma = matrix(c(2,1,1,2),2,2) # some positive definite symmetric matrix
pdsInverse(Sigma) # get inv(Sigma)
pdsInverse(Sigma,returnUpper=TRUE) # get inv(A), where Sigma=A'A, A is upper triangle
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.