1
$\begingroup$

I understand that Professor Harrell recommends using the target variable in Multiple Imputation. An example using aregImpute of the rms package is in his lecture notes: http://hbiostat.org/doc/rms.pdf p.12-20 to 12-22

In the note, the steps as I understood are as follows:

  1. use the whole training dataset (including target variable) to build a imputation model using aregImpute function of rms
  2. impute the training dataset, create a couple imputed copies
  3. use fit.mult.impute to build predictive models from the imputed datasets

My question is:

How should I then apply this model that was built on a new dataset with some missing data?

Should I:

  1. stack them to the train dataset and do aregImpute for all variables, build a model using only the newly imputed train, and then apply on the imputed test? But then wouldn't I have imputed the target for the new dataset as well?
  2. stack them to the train dataset and do aregImpute for all variables but Target, build a model using only the newly imputed train, and then apply on the imputed test? If this is the way to go, wouldn't the imputed values be biased? Also, how could one do this in R?

It would be really nice if one could take the imputation process and the model fitted and just apply it on a new dataset (like how one could apply PCA or any model

pca.fit(X)
pca.transform(X) 

) as this seems like such a common task for real-world predictive modeling...

$\endgroup$
  • $\begingroup$ Why would you have imputed your target? Does your target contain missing values? If not, the variable will not change across the imputed datasets. The imputation only affects variables with missing data. $\endgroup$ – user183974 Aug 27 '18 at 2:36
  • $\begingroup$ Thanks for the reply. I was not trying to impute my Target, I was following the advice that the Target variable needs to be included in the imputation model, otherwise the imputed value would be biased towards 0. However, it is not clear what to do with the Test dataset (or a future dataset which I am going to apply the predictive model on), in which all Target would by definition by not available. So, should I impute and then drop them, so as to keep the imputed values for all the predictor variables and be able to apply the predictive model? $\endgroup$ – Clark Chong Aug 27 '18 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.