Cholesky decomposition of a square matrix | R Documentation |
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@uoc.gr> and Manos Papadakis <papadakm95@gmail.com>
is.symmetric
x = matrix(rnorm(1000 * 50), ncol = 50)
s = cov(x)
a1 <- cholesky(s)
#a2 <- chol(s)
#all.equal(a1[upper.tri(a1)], a2[upper.tri(a2)])
x <- NULL
s <- NULL
a1 <- NULL
a2 <- NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.