Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mice.mids

Multivariate Imputation by Chained Equations (Iteration Step)


Description

Takes a mids object, and produces a new object of class mids.

Usage

mice.mids(obj, newdata = NULL, maxit = 1, printFlag = TRUE, ...)

Arguments

obj

An object of class mids, typically produces by a previous call to mice() or mice.mids()

newdata

An optional data.frame for which multiple imputations are generated according to the model in obj.

maxit

The number of additional Gibbs sampling iterations.

printFlag

A Boolean flag. If TRUE, diagnostic information during the Gibbs sampling iterations will be written to the command window. The default is TRUE.

...

Named arguments that are passed down to the univariate imputation functions.

Details

This function enables the user to split up the computations of the Gibbs sampler into smaller parts. This is useful for the following reasons:

  • RAM memory may become easily exhausted if the number of iterations is large. Returning to prompt/session level may alleviate these problems.

  • The user can compute customized convergence statistics at specific points, e.g. after each iteration, for monitoring convergence. - For computing a 'few extra iterations'.

Note: The imputation model itself is specified in the mice() function and cannot be changed with mice.mids. The state of the random generator is saved with the mids object.

Author(s)

Stef van Buuren, Karin Groothuis-Oudshoorn, 2000

References

Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software, 45(3), 1-67. https://www.jstatsoft.org/v45/i03/

See Also

Examples

imp1 <- mice(nhanes, maxit = 1, seed = 123)
imp2 <- mice.mids(imp1)

# yields the same result as
imp <- mice(nhanes, maxit = 2, seed = 123)

# verification
identical(imp$imp, imp2$imp)
#

mice

Multivariate Imputation by Chained Equations

v3.13.0
GPL-2 | GPL-3
Authors
Stef van Buuren [aut, cre], Karin Groothuis-Oudshoorn [aut], Gerko Vink [ctb], Rianne Schouten [ctb], Alexander Robitzsch [ctb], Patrick Rockenschaub [ctb], Lisa Doove [ctb], Shahab Jolani [ctb], Margarita Moreno-Betancur [ctb], Ian White [ctb], Philipp Gaffert [ctb], Florian Meinfelder [ctb], Bernie Gray [ctb], Vincent Arel-Bundock [ctb]
Initial release
2021-01-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.