Re: [R] Unexpected failure of Cholesky docomposition

2018-11-13 Thread Hoffman, Gabriel
abriel Hoffman mailto:gabriel.hoff...@mssm.edu>> Cc: "r-help@r-project.org<mailto:r-help@r-project.org>" mailto:r-help@r-project.org>> Subject: Re: [R] Unexpected failure of Cholesky docomposition Aren't singular values always positive or zero? Look at eigen(B)$values t

Re: [R] Unexpected failure of Cholesky docomposition

2018-11-13 Thread William Dunlap via R-help
Aren't singular values always positive or zero? Look at eigen(B)$values to check for positive definiteness. Fix your example - your B is not symmetric. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Nov 13, 2018 at 7:30 AM, Hoffman, Gabriel wrote: > My understanding is that a Cholesky

Re: [R] Unexpected failure of Cholesky docomposition

2018-11-13 Thread Bert Gunter
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

Re: [R] Unexpected failure of Cholesky docomposition

2018-11-13 Thread Eric Berger
Eigen shows that the matrix is not positive definite (it has a negative eigenvalue). And isSymmetric() also shows it is not symmetric - compare (3,4) and (4,3) On Tue, Nov 13, 2018 at 5:39 PM Hoffman, Gabriel wrote: > My understanding is that a Cholesky decomposition should work on any >

[R] Unexpected failure of Cholesky docomposition

2018-11-13 Thread Hoffman, Gabriel
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