There is a quite old yet very good question about the proper way for using rfImpute but to me the question raised by Doug7 (whether the target variable y gets used for the imputation of the features Xi and whether that would be harmful later when trying to fit models to the new imputed data set) has not really been answered.
The accepted answer by RNB points towards using mice
or missForest
R packages for imputation instead of randomForest
's rfImpute
but the differences are that these packages
- build individual imputation models for each variable Xi while
rfImpute
builds a single model for the whole dataset - you can choose to ex- or include the target variable y as a variable for all these individual imputation models in
mice
andmissForest
but you must include y inrfImpute
So I would like to raise the question about whether or not to use y during impute again but more generally and not limited to the use of rfImpute
. The only study I could find about this is a 2017 study which focuses more on whether or not to also impute missing values of y but it also has some experiments with the potential to shed light on the question of whether or not to make use of y during imputation. Since I think there is an error for item #3 in the table listing the experiments they made let me list the first 3 experiments relevant to my question again here as I understand it:
- complete case analysis as a reference (no multiple imputation [mi])
- no imputation of missing y, y not used in mi model
- no imputation of missing y, y used in mi model
So in a nut shell, the question is: can you use strategy #3 from above (which would allow you using the computationally much cheaper rfImpute
) or should you never make use of y in an imputation model (which would force you to go with something a lot more expensive like mice
or missForest
) and go with #2 instead when your concern is a model fit on the imputed data set?
My gut feeling told me not to use #3 but the study seems to show that when it comes to bias #3 clearly outperforms #2 and when it comes to error at least for larger data sets the same seems to be true. But this refers to the quality of the impute, not to the impact onto models fit on the new imputed data set!
What are your thoughts on this?
Thanks, Mark