ibind: Enlarge number of imputations by combining 'mids' objects

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/ibind.R

Description

This function combines two mids objects x and y into a single mids object, with the objective of increasing the number of imputed data sets. If the number of imputations in x and y are m(x) and m(y), then the combined object will have m(x)+m(y) imputations.

Usage

1
ibind(x, y)

Arguments

x

A mids object.

y

A mids object.

Details

The two mids objects are required to have the same underlying multiple imputation model and should be fitted on the same data.

Value

An S3 object of class mids

Author(s)

Karin Groothuis-Oudshoorn, Stef van Buuren

See Also

mids, rbind.mids, cbind.mids

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(nhanes)
imp1 <- mice(nhanes, m = 1, maxit = 2, print = FALSE)
imp1$m

imp2 <- mice(nhanes, m = 3, maxit = 3, print = FALSE)
imp2$m

imp12 <- ibind(imp1, imp2)
imp12$m
plot(imp12)

Example output

Loading required package: lattice

Attaching package: 'mice'

The following objects are masked from 'package:base':

    cbind, rbind

[1] 1
[1] 3
[1] 4
Warning messages:
1: In is.na(y) : is.na() applied to non-(list or vector) of type 'NULL'
2: In is.na(y) : is.na() applied to non-(list or vector) of type 'NULL'
3: In is.na(y) : is.na() applied to non-(list or vector) of type 'NULL'
4: In is.na(y) : is.na() applied to non-(list or vector) of type 'NULL'

mice documentation built on Nov. 14, 2020, 5:07 p.m.

Related to ibind in mice...