Learn R Programming

mi (version 0.06-5)

mi.completed: Multiply Imputed Dataframes

Description

Function to return completed data set from result of mi program.

Usage

## S3 method for class 'mi':
mi.completed(object)
## S3 method for class 'mi':
mi.data.frame(object, m = 1)

Arguments

object
mi object containing a multiply imputed data set. The mi object is generated by the mi function.
m
Index of the imputed data set. The default is 1.

Value

  • A data set or a list of datasets with the missing data imputed.

References

Andrew Gelman and M. Grazia Pittau. A flexible program for missing-data imputation and model checking. Technical report. Columbia University, New York; Andrew Gelman and Jennifer Hill. (2007). Data Analysis Using Regression and Multilevel/Hierarchical Models. Cambridge University Press.

See Also

mi

Examples

Run this code
data(CHAIN)
  IMP <- mi (CHAIN, n.iter=6, add.priors=FALSE)
  # get all imputed dataset
  imputed.matrix <- mi.completed (IMP)  
  # get the 3rd chain of the imputed dataset
  imputed.data.frame <- mi.data.frame(IMP, m=3)

Run the code above in your browser using DataLab