mcar(x, miss.obj = miss(x), mu = <<see below>>, cov = <<see below>>, tol = sqrt(.Machine$double.eps))
emGauss
.
If only
cov
is supplied then
mu
is the generalized least squares
(normal model maximum likelihood)
estimate given the
available data and
cov
.
"mcar"
with components:
miss
and are described in the help file
for that function.
t.values
, and the two group sizes
in
t.present
and
t.missing
. The statistics are computed only
if there are at least two observations in each group.
The result of this function is normally printed by
print.mcar
, which
provides a formatted display. To see all components
of the result use
print.default(mcar(x))
.
The test will fail if any eigenvalues of
cov
are negative.
This function provides diagnostic measures to check whether data
are Missing Completely At Random (MCAR),
which means (informally)
that whether a variable is missing is independent of the values
(either observed or missing)
of other variables and of the variable itself;
see the references below. The diagnostics
here check whether the missingness of each variable depends upon
the values of other numerical variables, but do not check whether
there is dependence with the values of the variable itself,
as occurs for example with censoring.
Little's d-squared is sum of normalized
Mahalanobis distances
between the
overall
mu
and the
sample means for each subset of the data consisting of rows
with the same pattern of missing columns. If these distances
are large it provides evidence of dependence between one or more
numerical variables with whether one or more other variables are missing.
Here a "normalized" Mahalanobis distance
means that the covariance matrix used
is the covariance matrix for the sample mean for each pattern,
i.e. the matrix for a single observation divided by the number
of observations in the pattern.
The t-values provide similar information for each pair of a numeric
variable and another variable with missing values
If data are not MCAR then
some methods for handling missing data (e.g. in
var
)
give biased and inconsistent estimates.
Little, R. J. A. (1988).
A test of missing completely at random for multivariate data with
missing values.
Journal of the American Statistical Asssociation
38, 1198-1202.
Little, R. J. A., and Rubin, D. R. (1987).
Statistical Analysis with Missing Data.
Wiley, New York.
Hesterberg, Tim C. (1999).
A Graphical Representation of Little's Test for MCAR.
Technical Report No. 94,
Research Department, Insightful Corporation.
http://www.insightful.com/Hesterberg/articles/tech94-mi-little.pdf
Schafer, J. L. (1997).
Analysis of Incomplete Multivariate Data.
Chapman & Hall, London.
x <- longley.x; x[runif(96) > .9] <- NA # random missing data miss(x) # view patterns of missing data M <- mcar(x) M print.default(M) plot(M)