title: 'Leading minor of order % is not positive definite' error in MICE
body: <p>When running <code>mice</code> in R with a rather large set of data (30 categorical predictors and predicted variables,<br>
  <em>n</em> = 1000), I get the following error:</p>
  
  <blockquote>
    <p>Error in <code>chol.default(fit.sum$cov.unscaled)</code> : the leading minor of order 17 is not positive definite</p>
  </blockquote>
  
  <p>I use <code>polyreg</code> (multinomial regression) for most variables as the imputation method. Since I do not know why this error occurs, I cannot post any more code that would reproduce it. </p>
  
  <p>I found a post with a similar problem <a href="https://stats.stackexchange.com/questions/55925/the-leading-minor-of-order-1-is-not-positive-definite-error-using-2l-norm-in-m">here</a> when using linear regression in MICE. This post did not receive any answers on Cross Validated.</p>
  
  <p>It might be also related to some procedure that becomes necessary in Gibbs sampling, as indicated by <a href="https://stackoverflow.com/questions/18087355/r-coda-the-leading-minor-of-order-3-is-not-positive-definite">this</a> post. The OP described this error in a self-programmed function using <code>MCMC</code>, which is related to procedures MICE uses.</p>
  
  <p>I do not know what a leading minor is – if somebody could tell me, maybe that would be a start.</p>