29-Cholesky inverse | R Documentation |
Performs the inverse of the original matrix using the Cholesky factorization of an MPCR matrix x.
## S4 method for signature 'Rcpp_MPCR'
chol2inv(x, size = NCOL(x))
x |
An MPCR object. |
size |
The number of columns to use. |
An MPCR object.
library(MPCR)
x <- as.MPCR(c(1.21, 0.18, 0.13, 0.41, 0.06, 0.23,
0.18, 0.64, 0.10, -0.16, 0.23, 0.07,
0.13, 0.10, 0.36, -0.10, 0.03, 0.18,
0.41, -0.16, -0.10, 1.05, -0.29, -0.08,
0.06, 0.23, 0.03, -0.29, 1.71, -0.10,
0.23, 0.07, 0.18, -0.08, -0.10, 0.36),6,6,precision="single")
chol_out <- chol(x)
chol <- chol2inv(chol_out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.