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

mice.nmi

Nested Multiple Imputation


Description

Performs nested multiple imputation (Rubin, 2003) for the functions mice::mice and mice.1chain. The function mice.nmi generates an object of class mids.nmi.

Usage

mice.nmi(datlist, type="mice", ...)

## S3 method for class 'mids.nmi'
summary(object, ...)

## S3 method for class 'mids.nmi'
print(x, ...)

Arguments

datlist

List of datasets for which nested multiple imputation should be applied

type

Imputation model: type="mice" for mice::mice or type="mice.1chain" for mice.1chain.

...

Arguments to be passed to mice::mice or mice.1chain.

object

Object of class mids.nmi.

x

Object of class mids.nmi.

Value

Object of class mids.nmi with entries

imp

List of nested multiply imputed datasets whose entries are of class mids or mids.1chain.

Nimp

Number of between and within imputations.

References

Rubin, D. B. (2003). Nested multiple imputation of NMES via partially incompatible MCMC. Statistica Neerlandica, 57(1), 3-18. doi: 10.1111/1467-9574.00217

See Also

For imputation models see mice::mice and mice.1chain.

Functions for analyses of nested multiply imputed datasets: complete.mids.nmi, with.mids.nmi, pool.mids.nmi

Examples

## Not run: 
#############################################################################
# EXAMPLE 1: Nested multiple imputation for TIMSS data
#############################################################################

library(BIFIEsurvey)
data(data.timss2, package="BIFIEsurvey" )
datlist <- data.timss2
   # list of 5 datasets containing 5 plausible values

#** define imputation method and predictor matrix
data <- datlist[[1]]
V <- ncol(data)
# variables
vars <- colnames(data)
# variables not used for imputation
vars_unused <- miceadds::scan.vec("IDSTUD TOTWGT  JKZONE  JKREP" )

#- define imputation method
impMethod <- rep("norm", V )
names(impMethod) <- vars
impMethod[ vars_unused ] <- ""

#- define predictor matrix
predM <- matrix( 1, V, V )
colnames(predM) <- rownames(predM) <- vars
diag(predM) <- 0
predM[, vars_unused ] <- 0

#***************
# (1) nested multiple imputation using mice
imp1 <- miceadds::mice.nmi( datlist, method=impMethod, predictorMatrix=predM,
                m=4, maxit=3 )
summary(imp1)

#***************
# (2) nested multiple imputation using mice.1chain
imp2 <- miceadds::mice.nmi( datlist, method=impMethod, predictorMatrix=predM,
            Nimp=4, burnin=10,iter=22, type="mice.1chain")
summary(imp2)

## End(Not run)

miceadds

Some Additional Multiple Imputation Functions, Especially for 'mice'

v3.11-6
GPL (>= 2)
Authors
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>), Simon Grund [aut] (<https://orcid.org/0000-0002-1290-8986>), Thorsten Henke [ctb]
Initial release
2021-01-21 11:48:47

We don't support your browser anymore

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