Learn R Programming

fastmatrix (version 0.5-7721)

mchol: The modified Cholesky factorization

Description

Compute the Cholesky factorization of a real symmetric but not necessarily positive definite matrix.

Usage

mchol(x)

Value

The lower triangular factor of modified Cholesky decomposition, i.e., the matrix

\(\bold{L}\) such that \(\bold{X} + \bold{E} = \bold{LL}^T\), where \(\bold{E}\)

is a nonnegative diagonal matrix that is zero if \(\bold{X}\) es sufficiently positive definite.

Arguments

x

a symmetric but not necessarily positive definite matrix to be factored.

References

Gill, P.E., Murray, W., Wright, M.H. (1981). Practical Optimization. Academic Press, London.

Nocedal, J., Wright, S.J. (1999). Numerical Optimization. Springer, New York.

See Also

chol, ldl

Examples

Run this code
# a non-positive-definite matrix
a <- matrix(c(4,2,1,2,6,3,1,3,-.004), ncol = 3)
try(chol(a)) # fails
z <- mchol(a)
z # triangular factor

# modified 'a' matrix
tcrossprod(z)

Run the code above in your browser using DataLab