Cholesky decomposition of a square matrix
Cholesky decomposition of a square matrix.
cholesky(x,parallel = FALSE)
x |
A square positive definite matrix. |
parallel |
A boolean value for parallel version. |
The Cholesky decomposition of a square positive definite matrix is computed. The use of parallel is suggested for matrices with dimensions of 1000 or more.
An upper triangular matrix.
Manos Papadakis
R implementation and documentation: Michail Tsagris <mtsagris@yahoo.gr> and Manos Papadakis <papadakm95@gmail.com>
x = matrix(rnorm(1000 * 50), ncol = 50) s = cov(x) system.time(a1 <- cholesky(s)) system.time(a2 <- chol(s)) all.equal(a1[upper.tri(a1)], a2[upper.tri(a2)]) x <- NULL s <- NULL a1 <- NULL a2 <- NULL
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.