[R] Unexpected failure of Cholesky docomposition

Bert Gunter bgunter@4567 @ending from gm@il@com
Tue Nov 13 16:48:51 CET 2018


Your understanding is wrong. The eigenvalues, not singular values, must be
positive, and they are not.

Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Nov 13, 2018 at 7:39 AM Hoffman, Gabriel <gabriel.hoffman using mssm.edu>
wrote:

> My understanding is that a Cholesky decomposition should work on any
> square, positive definite matrix.  I am encountering an issue where chol()
> fails and give the error: "the leading minor of order 3 is not positive
> definite"
>
> This occurs on multiple machines and version of R.
>
> Here is a minimal reproducible example:
>
> # initialize matrix
> values = c(1,0.725,0,0,0.725,1,0.692,0,0,0.692,1,0.644,0,0,0.664,1)
> B = matrix(values, 4,4)
>
> # show that singular values are positive
> svd(B)$d
>
> # show that matrix is symmetric
> isSymmetric(B)
>
> # B is symmetric positive definite, but Cholesky still fails
> chol(B)
>
> Is this a numerical stability issue?  How can I predict which matrices
> will fail?
>
> - Gabriel
>
>
>
>
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list