문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top