I need to do a Multiple Imputation on a dataset with several missing values, and I need to do it with mice, because later I'll have to compare the results with those of imputations ran with other programs.

My colleague obtained a completa dataset by running a MI on the incomplete dataset, with 5 iterations, and then taking the 5 imputed datasets and manually calculating mean values. Se essentially he pooled manually. I'm far from an expert so I don't know if this operation is valid.

Anyways, in MICE so far I could run the imputation (again, with maxit=5), using the function "imp<-mice(eco)", where "eco" is the incomplete dataset. So I obtained the 5 imputed datasets, stored in the object "imp", of class "MIDS". Now I just need to pool the 5 completed datasets to obtain a unique complete one, i don't wanna run analyses on the 5 datasets and then pool the results. Can that be done? If I got it right from the manual, it seems that MICE allows you to pool only after you ran some analysis on the imputed datasets. The analysis is repeated on each dataset and the results are stored in an object of class "MIRA". I tried to run the function "pool()" on "imp" but it can't be done because imp is of class "mids" and you can only pool mira objects.

The manual also says that to pool you need a variance/covariance relation, and in the example given there they run a linear regression and then they pool the results of the regression. But I doubt if it's what I need. I'm confused


2 Answers 2


A major point of multiple imputations is to do separate analyses on each of the imputed data sets, so that you can get both pooled estimates of things like regression coefficients and an estimate of the errors in the coefficients. Averaging the imputed data sets first is not the correct use of this approach. And don't limit yourself to so few imputations; with modern computers there's no reason not to do 100 or more. See Stef van Buuren's Flexible Imputation of Missing Data for further information; he developed the mice package

  • $\begingroup$ +1 for not limiting yourself to few imputations. This paper shows that we usually need more than we think we do. $\endgroup$
    – Kenji
    Commented Jun 1, 2017 at 13:47
  • $\begingroup$ But why is it incorrect to do it this way? I am having a lot of difficulty finding any information as to what the actual cost is of pooling your data first and then running the stats tests. For things like mixed models, it seems to create a ton of additional issues, namely a lack of functionality for necessary and often new functions for lmer/glmer objects because many libraries simply don't know how to handle mids/mira objects. Also this link seems to return a 404 error. $\endgroup$ Commented Sep 8, 2022 at 2:59
  • 1
    $\begingroup$ @ShawnHemelstrand thanks for noting the broken link. I fixed it; please look at it. Comments on your related question describe a couple of reasons why you can't just proceed with analyzing the pooled data together. If your model types aren't handled directly, this page outlines how to do the pooling yourself, with a link to a review on the topic. $\endgroup$
    – EdM
    Commented Sep 8, 2022 at 15:29
  • $\begingroup$ Thanks EdM for the advice $\endgroup$ Commented Sep 8, 2022 at 22:32

iris.mis is the data with missing values

imputed_Data <- mice(iris.mis, m=5, maxit = 50, method = 'pmm', seed = 500)

Here is an explanation of the parameters used: m – Refers to 5 imputed data sets maxit – Refers to no. of iterations taken to impute missing values method – Refers to method used in imputation. we used predictive mean matching.

check imputed values


Also, if you wish to build models on all 5 datasets, you can do it in one go using with() command. You can also combine the result from these models and obtain a consolidated output using pool() command.

build predictive model

fit <- with(imputed_Data,lm(Sepal.Width ~ Sepal.Length +

combine results of all 5 models


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.