When running mice
in R with a rather large set of data (30 categorical predictors and predicted variables,
n = 1000), I get the following error:
Error in
chol.default(fit.sum$cov.unscaled)
: the leading minor of order 17 is not positive definite
I use polyreg
(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.
I found a post with a similar problem here when using linear regression in MICE. This post did not receive any answers on Cross Validated.
It might be also related to some procedure that becomes necessary in Gibbs sampling, as indicated by this post. The OP described this error in a self-programmed function using MCMC
, which is related to procedures MICE uses.
I do not know what a leading minor is – if somebody could tell me, maybe that would be a start.
In my case the model might have been overspecified. If I reduce the predictor matrix, the problem does not occur. One option to do so is
quickpred()
which automatically generates a more sparse predictor matrix based on bivariate serial correlations.