mice.mids {mice}R Documentation

Multivariate Imputation by Chained Equations (Iteration Step)

Description

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

Usage

## S3 method for class 'mids':
mice(obj, maxit=1, diagnostics=TRUE, printFlag=TRUE)

Arguments

obj An object of class mids, typically produces by a previous call to mice() or mice.mids()
maxit The number of additional Gibbs sampling iterations.
diagnostics A Boolean flag. If TRUE, diagnostic information will be appended to the value of the function. If FALSE, only the imputed data are saved. The default is TRUE.
printFlag A Boolean flag. If TRUE, diagnostic information during the Gibbs sampling iterations will be written to the command window. The default is TRUE.

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:

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, C.G.M. (2000) Multivariate Imputation by Chained Equations: MICE V1.0 User's manual. Leiden: TNO Quality of Life. http://www.stefvanbuuren.nl/publications/MICE V1.0 Manual TNO00038 2000.pdf

See Also

complete, mice, set.seed

Examples

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

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

# for example:
# 
# > imp$imp$bmi[1,]
#      1    2    3    4    5 
# 1 30.1 35.3 33.2 35.3 27.5
# > imp2$imp$bmi[1,]
#      1    2    3    4    5 
# 1 30.1 35.3 33.2 35.3 27.5
# 

[Package mice version 1.21 Index]