-
Notifications
You must be signed in to change notification settings - Fork 110
/
Copy pathmd.pairs.Rd
48 lines (46 loc) · 1.48 KB
/
md.pairs.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/md.pairs.R
\name{md.pairs}
\alias{md.pairs}
\title{Missing data pattern by variable pairs}
\usage{
md.pairs(data)
}
\arguments{
\item{data}{A data frame or a matrix containing the incomplete data. Missing
values are coded as \code{NA}.}
}
\value{
A list of four components named \code{rr}, \code{rm}, \code{mr} and
\code{mm}. Each component is square numerical matrix containing the number
observations within four missing data pattern.
}
\description{
Number of observations per variable pair.
}
\details{
The four components in the output value is have the following interpretation:
\describe{ \item{list('rr')}{response-response, both variables are observed}
\item{list('rm')}{response-missing, row observed, column missing}
\item{list('mr')}{missing -response, row missing, column observed}
\item{list('mm')}{missing -missing, both variables are missing} }
}
\examples{
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))
}
\references{
Van Buuren, S., Groothuis-Oudshoorn, K. (2011). \code{mice}:
Multivariate Imputation by Chained Equations in \code{R}. \emph{Journal of
Statistical Software}, \bold{45}(3), 1-67.
\doi{10.18637/jss.v045.i03}
}
\author{
Stef van Buuren, Karin Groothuis-Oudshoorn, 2009
}
\keyword{univar}