cholRoot: Lower Cholesky Root

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function is similar to base::chol, but it returns the lower root and possibly remove unnecessary columns.

Usage

1

Arguments

x

A positive semidefinite matrix.

Details

This function calls base::chol with pivoting and returns the lower root. In the case of less than full rank x, unnecessary columns are removed. tcrossprod(cholRoot(x)) will reproduce x (up to numerical errors).

Value

A numeric matrix, not necessarily a square matrix.

Author(s)

Long Qu

See Also

Matrix::chol, base::chol.

Examples

1
2
3
4
5
	set.seed(3456L)
	A=tcrossprod(matrix(runif(10L), 5L))
	cholRoot(A)
	range(A - tcrossprod(cholRoot(A)))
	


Search within the varComp package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.