ImputeData: Multiple Imputation by Chained Equations

Description Usage Arguments Details References Examples

View source: R/mice_extentions.R

Description

A wrapper around the mice function with different defaults and added functionality around excluding predictors that would unacceptibly slow down the imputation.

Usage

1
ImputeData(data, m = 10, maxit = 15, droplist = NULL)

Arguments

data

A data frame with at least one missing (NA) value.

m

The number of complete data sets generated by the imputation procedure

maxit

The number of iterations in the Gibbs "chained equations" imputation procedure. the mice package defaults to 5, but their documentation mentions that 15-20 should be sufficient.

droplist

A new feature added to

Details

The procedure works like this...

References

Stef van Buuren, Karin Groothuis-Oudshoorn (2011). mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software, 45(3), 1-67. URL http://www.jstatsoft.org/v45/i03/.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(testdata)
head(testdata)
    
# a multiply imputed data set, or mids object
mids <- ImputeData(testdata)
    
# a single imputation
complete.1 <- complete(mids, 1)
head(complete.1)
    
# another imputation
complete.2 <- complete(mids, 2)
head(complete.2)

mids.2 <- ImputeData(testdata, m = 5, maxit = 5, droplist = c("w"))

google/glmmplus documentation built on May 17, 2019, 7:47 a.m.