md.pairs | R Documentation |
Number of observations per variable pair.
md.pairs(data)
data |
A data frame or a matrix containing the incomplete data. Missing
values are coded as |
The four components in the output value is have the following interpretation:
response-response, both variables are observed
response-missing, row observed, column missing
missing -response, row missing, column observed
missing -missing, both variables are missing
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.
Stef van Buuren, Karin Groothuis-Oudshoorn, 2009
Van Buuren, S., Groothuis-Oudshoorn, K. (2011). mice
:
Multivariate Imputation by Chained Equations in R
. Journal of
Statistical Software, 45(3), 1-67.
\Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v045.i03")}
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.