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@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.