Closed bugravarol closed 2 years ago
By default, mice
relies on linear regression for imputation. The message df set to 1. # observed cases: 63 # predictors: 120
tells you that you have more cases than free parameters in the imputation model. Since we cannot work with negative degrees of freedom (df), mice
sets it to the minimal value of 1. In order to move on with the calculations, mice
removes predictors one by one. In your case it takes out about 60 variables.
Subsequently, the message mice detected that your data are (nearly) multi-collinear
signals that the remaining problem is still overdetermined, so mice
takes rescue measures in order not to crash.
Then the story repeats for the next variable, and so on...
In cases like these, use quickpred()
to quickly trim down the imputation model. Try methods cart
or rf
, which are less sensitive to overdetermined systems, or lasso.norm
for regression with an L1 penalty.
Hello everybody. In the mice package, I simulated a high-dimensional data and generated missing structures in the first 50 variables (25% per variable). Later, when I want to imput these missing values by the methods in mice, I get warnings as follows. I searched for this but couldn't figure it out. I added the term (ls.meth="ridge") inside the function but I keep getting the warning
I couldn't find where I made a mistake. How can I make correct imputations using the mice package for a high-dimensional dataset that I have simulated in this way?
1 df set to 1. # observed cases: 63 # predictors: 120
2 V2, V3, V4, V6, V9, V14, V15, V17, V19, V23, V25, V26, V28, V30, V31, V34, V36, V38, V39, V46, V49, V52, V53, V54, V64, V66, V67, V68, V70, V73, V79, V82, V84, V89, V91, V93, V94, V95, V99, V100, V101, V106, V107, V108, V109, V111, V117, V120
3 mice detected that your data are (nearly) multi-collinear.\nIt applied a ridge penalty to continue calculations, but the results can be unstable.\nDoes your dataset contain duplicates, linear transformation, or factors with unique respondent names?
4 df set to 1. # observed cases: 69 # predictors: 120
5 V1, V3, V4, V5, V14, V21, V22, V25, V27, V30, V35, V37, V41, V43, V44, V47, V51, V53, V55, V58, V59, V60, V61, V68, V71, V72, V81, V82, V84, V90, V93, V94, V97, V101, V105, V108, V111, V117
6 mice detected that your data are (nearly) multi-collinear.\nIt applied a ridge penalty to continue calculations, but the results can be unstable.\nDoes your dataset contain duplicates, linear transformation, or factors with unique respondent names?