# How to combine multiple imputed datasets?

I need a single imputed dataset (e.g. to create a country group dummy from the imputed country per capita income data). R offers packages package for creating multiple imputed data (e.g. Amelia) and combining results from multiple datasets (as in MItools). My concern is if I can average all the imputed data to obtain a single dataset. If so, how can I do it in R?

• Averaging data is bad because it inflates correlations. The real question is why you think you need a single imputed data set. Everything that you can do with a single data set, you can do on a multiply-imputed data set. – Stef van Buuren Jul 4 '13 at 10:51
• @Stef : Is it also the case if we want to compute the marginal effect in case of selection model like Heckit model?. I can compute the marginal effect on each imputed data; but the question is whether theory has anything to say on how to combine these. Thanks. – Metrics Jul 4 '13 at 12:54
• Just pool! There is no theory that allows us to do this. But there is no theory that forbids this either. – Stef van Buuren Jul 4 '13 at 13:39
• @Stef ,in mice::pool, it is specified that the object should be with.mids() or as.mira(). Can machine learning models be used instead of regression methods? – KarthikS Dec 8 '15 at 22:32

You can't average the data. Since the variables will be same across the imputed data, you have to append each imputed data. For example, if you have 6 variables with 1000 observations and your imputation frequency is 5 , then you will have the final data of 6 variables with 5000 observations. You use the rbind function to append the data in R. For example, if you have five imputed data (assuming that you have already these data in hand), your final data will be obtained as

finaldata <- rbind(data1,data2,data3,data4,data5)


For details, see here.

After imputation:

The regression coefficient from each imputed data will be usually different; so the coefficient is obtained as average of coefficients of all imputed data. But, there is additional rule for standard error. See here for details.

• The statement finaldata <- complete(data, "long") in [mice][1] does the same. It can also produce other shapes, e.g. a broad matrix or repeated matrix. [1]: cran.r-project.org/web/packages/mice/index.html "mice" – Stef van Buuren Jul 4 '13 at 11:08
• @Stef: Thanks. I haven't used mice yet. I would like to know whether the mice does the analysis when we only have multiple imputed data (but not the original data) from survey. – Metrics Jul 4 '13 at 12:39
• Yes, you can, but you need to transform the multiply-imputed data into a mids object in order to use the standard mice post-imputation functions for repeated analyses, diagnostics and pooling. The next version of mice (2.18) will include an as.mids function that does this, but it requires the original data to be present. It won't (yet) handle the case where we don't know where the missing data are. – Stef van Buuren Jul 4 '13 at 13:16
• Thanks. So, still I can't use, for example, where I have only the multiple imputed data set as in Survey of consumer Finance. – Metrics Jul 4 '13 at 13:44
• If you don't know where the missing data are, you'll need to backcalculate them from the imputed data. This will incorrectly classify points as observed if, by happenstance, all imputations for that cell are identical across the m data sets. As a consequence, the diagnostics may incorrectly label imputed points as observed points (in mice terminology: some red points are incorrectly plotted as blue points). However, this does not affect the validity of the statistical inferences. So, with some extra effort, you can. – Stef van Buuren Jul 4 '13 at 13:51

Multiple imputation models for missing data are rarely employed in practice as simulation studies suggest that the chances of the true underlying parameters lying within the cover intervals are not always accurately depicted. I would strongly recommend a testing of the process based on simulated data (with parameters known precisely), based on real data in the area of investigation. A simulation study reference https://www.google.com/url?sa=t&source=web&rct=j&ei=Ua4BVJgD5MiwBMKggKgP&url=http://www.ssc.upenn.edu/~allison/MultInt99.pdf&cd=13&ved=0CCEQFjACOAo&usg=AFQjCNF1Rg6SbFPwLv5n3jYIVNA_iTMPCg&sig2=d2VORWbqTNygdM6Z51TZEg

I suspect employing say five simple/naive models for the missing data may be better in producing less bias and cover intervals that accurately include the true underlying parameters. Rather than pooling of the parmeter estimates, one may do better by employing Bayesian techniques (see work with imputation models in this light at https://www.google.com/url?sa=t&source=web&rct=j&ei=mqcAVP7RA5HoggSop4LoDw&url=http://gking.harvard.edu/files/gking/files/measure.pdf&cd=5&ved=0CCUQFjAE&usg=AFQjCNFCZQwfWJDrrjzu4_5syV44vGOncA&sig2=XZUM14OMq_A01FyN4r61Zw ).

Yes, not much of a ringing endorsement of standard missing data imputation models and to quote a source, for example, http://m.circoutcomes.ahajournals.org/content/3/1/98.short?rss=1&ssource=mfr :"We describe some background of missing data analysis and criticize ad hoc methods that are prone to serious problems. We then focus on multiple imputation, in which missing cases are first filled in by several sets of plausible values to create multiple completed datasets,..." where I would insert "(?)" after plausible as naive models, for one, are not generally best described as producing plausible predictions. However, models incorporating the dependent variable y, itself, as an independent variable (so called calibration regression) may better meet this characterization.