# How do the number of imputations & the maximum iterations affect accuracy in multiple imputation?

The help page for MICE defines the function as:

mice(data, m = 5, method = vector("character", length = ncol(data)),
predictorMatrix = (1 - diag(1, ncol(data))),
visitSequence = (1:ncol(data))[apply(is.na(data), 2, any)],
form = vector("character", length = ncol(data)),
post = vector("character", length = ncol(data)), defaultMethod = c("pmm",
"logreg", "polyreg", "polr"), maxit = 5, diagnostics = TRUE,
printFlag = TRUE, seed = NA, imputationMethod = NULL,
defaultImputationMethod = NULL, data.init = NULL, ...)


Those are a lot of parameters. How does one decide which parameters to specify and which ones to leave as default?

I'm especially interested in the number of multiple imputations, m and the maximum iterations, maxit. How do these parameters affect accuracy?

In other words, when (how?) - whilst using these parameters - can I really say that a sort of convergence has been reached?

• Your question as originally stated, was on the border of being too broad & too much about R's implementation. It could have been closed for those reasons. However, you do have a reasonably focused & software neutral statistical question that is on topic here, so I edited your title to emphasize that. Let me know if that's not acceptable. Commented Jun 15, 2016 at 15:36

Let's just go through the parameters one by one:

• data doesn't require explanation
• m is the number of imputations, generally speaking, the more the better. Originally (following Rubin, 1987) 5 was considered to be enough (hence the default). So from an accuracy point of view, 5 may be sufficient. However, this was based on an efficiency argument only. In order to achieve better estimates of standard errors, more imputations are needed. These days there is a rule of thumb to use whatever the average percentage rate of missingness is - so if there is 30% missing data on average in a dataset, use 30 imputations - see Bodner (2008) and White et al (2011) for further details.
• method specifies which imputation method is to be used - this only necessary when the default method is to be over-ridden. For example, continuous data are imputed by predictive mean matching by default, and this usually works very well, but Bayesian linear regression, and several others including a multilevel model for nested/clustered data may be specified instead. Hence, expert/clinical/statistical knowledge may be of use in specifying alternatives to the default method(s).
• predictorMatrix is a matrix which tells the algorithm which variables predict missingness in which other variables. mice uses a default based on correlations between variables and the proportion of usable cases if this is not specified. Expert/clinical knowledge may be very useful in specifying the predictor matrix, so the default should be used with care.
• visitSequence specifies the order in which variables are imputed. It is not usually needed.
• form is used primarily to aid the specification of interaction terms to be used in imputation, and isn't normally needed.
• post is for post-imputation processing, for example to ensure that positive values are imputed. This isn't normally needed.
• defaultMethod changes the default imputation methods, and is not normally needed
• maxit is the number of iterations for each imputation. mice uses an iterative algorithm. It is important that the imputations for all variables reach convergence, otherwise they will be inaccurate. By inspecting the trace plots generated by plot() this can be visually determined. Unlike other Gibbs sampling methods, far fewer iterations are needed - generally in the region of 20-30 or less as a rule of thumb. When the trace lines reach a value and fluctuate slightly around it, convergence has been achieved. The following is an example showing healthy convergence, taken from here :

Here, 3 variables are being imputed with 5 imputations (coloured lines) for 20 iterations (x-axis on the plots), the y-axis on the plots are the imputed values for each imputation.

• diagnostics produces useful diagnostic information by default.

• printFlag outputs the algorithm progress by default which is useful because the estimated time to completion can easily be ascertained.

• seed is a random seed parameter which is useful for reproducibility.

• imputationMethod and defaultImputationMethod are for backwards compatibility only.

Bodner, Todd E. (2008) “What improves with increased missing data imputations?” Structural Equation Modeling: A Multidisciplinary Journal 15: 651-675. https://dx.doi.org/10.1080/10705510802339072

Rubin, Donald B. (1987) Multiple Imputation for Nonresponse in Surveys. New York: Wiley.

White, Ian R., Patrick Royston and Angela M. Wood (2011) “Multiple imputation using chained equations: Issues and guidance for practice.” Statistics in Medicine 30: 377-399. https://dx.doi.org/10.1002/sim.4067

• +1 for a very thorough and helpful response. I'd just add that it's important to pay some attention to the details of the method and of the prediction matrix, as these might be informed by the nature of the data and by knowledge of the subject matter.
– EdM
Commented Jun 15, 2016 at 17:15
• @EdM, I do agree,though this wasn't the point of the question, which is why I didn't mention it. I'll update my answer accordingly. Commented Jun 16, 2016 at 6:51
• A very nice summary of the number of imputations in this online textbook on missing data: bookdown.org/mwheymans/bookmi/… Similar to the above answer, they cite Bordner and White et al for n roughly be the % of missing data; Van Buuren (2018) argued that less than that may be needed if there is a 'good' correlation between the variables so imputation can work. Commented Jul 20, 2021 at 22:04

Until 5 years ago, the most popular rule of thumb was that the number of imputations should be equal to the % of missing information, but it turns out it's not a linear relationship. It's quadratic. Plus the number of imputations depends on how much random noise you can tolerate in your estimates; more imputations-->less noise.

In 2020, von Hippel (that's me) published a paper explaining how to calculate the number the imputations you need given your tolerance for noise. There's a blog post here that includes links to software implementations in R, Stata, and SAS: https://statisticalhorizons.com/how-many-imputations/