Learn R Programming

mice (version 2.7)

md.pairs: Missing data pattern by variable pairs

Description

Number of observations per variable pair.

Usage

md.pairs(data)

Arguments

data
A data frame or a matrix containing the incomplete data. Missing values are coded as NA.

Value

  • A list of four components named rr, rm, mr and mm. Each component is square numerical matrix containing the number observations within four missing data pattern.

Details

The four components in the output value is have the following interpretation: [object Object],[object Object],[object Object],[object Object]

References

Van Buuren, S., Groothuis-Oudshoorn, K. (2009) MICE: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software, forthcoming. http://www.stefvanbuuren.nl/publications/MICE in R - Draft.pdf

Examples

Run this code
pat <- md.pairs(nhanes)
pat

# show that these four matrices decompose the total sample size
# for each pair
pat$rr + pat$rm + pat$mr + pat$mm

# percentage of usable cases to impute row variable from column variable
round(100*pat$mr/(pat$mr+pat$mm))

Run the code above in your browser using DataLab