Description Usage Arguments Value Examples
View source: R/Bayesian_Bricks.r
Use Cholesky decomposition to calculate the determinant of S, where S = A'A, A is a upper diagonal matrix. det(S) = det(A)*det(A).
1 | pdsDeterminant(S, LOG = FALSE)
|
S |
a symmetric positive definitive matrix. |
LOG |
logical, return log(det(S)) if TRUE, return det(S) if FALSE, default FALSE. |
A matrix, the determinant of "S".
1 2 3 4 | Sigma = matrix(c(1.3,1,1,2),2,2) # some positive definite symmetric matrix
pdsDeterminant(Sigma) # get inv(Sigma)
pdsDeterminant(Sigma,LOG=TRUE) # 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.