# Cholesky decomposition of the covariance matrix: not positive definite?

I am implementing a multivariate simulation in R and when applying the Cholesky decomposition to the covariance matrix I get:

the leading minor of order one is not positive definite

How could the Covariance matrix be modified in order to be semi-positive definite and therefore allow for the application of the Chol matrix?

• You do not want to modify the covariance matrix. This is a numerical issue, covariance matrix should always allow Cholesky decomposition by definition. – Knarpie Jun 12 '18 at 13:15
• Translation of the error: "Your matrix has a negative value on the diagonal, which is impossible for any covariance matrix. Check your work." It's difficult to produce negative diagonal values when estimating covariance matrices (the usual problem occurs with pairwise estimation of covariances, but that won't create this issue). Therefore, look for bugs in the simulation code. – whuber Jun 12 '18 at 13:18
• You can try ledoit wolf shrinkage estimator arxiv.org/pdf/1207.5322.pdf – Aksakal Jun 12 '18 at 15:03
• @Aksakal Honey*, I think you're supposed to use that to shrink condition numbers for sample covariance matrices having some small or nonnegative egienvalues, but not negative eigenvalues. But sure, if you add some sufficiently high multiple of the identity matrix (any multiple $\ge$ magnitude of most negative eigenvalue), you will get a psd matrix - and actually that is a fix used in, and appropriate to many situations, though not necessarily this one. * researchgate.net/publication/… – Mark L. Stone Jun 12 '18 at 17:34
• @MarkL.Stone, it's used in this case too – Aksakal Jun 12 '18 at 17:41