plot.mcar(x, ..., legend = F, args.key = NULL, whichPlot = 1:2, ask = missing(whichPlot), patterns)
mcar
object (created by
mcar
).
ylim
can be used to make space for a legend.
TRUE
a legend will be drawn using
key
.
key
, e.g.
x
and
y
.
1
then only the first plot is done,
if
2
then only the second plot is done.
TRUE
then the function pauses between plots.
By default, the function pauses between the first and second
plots if both are shown.
mu
, the heights of the
rectangles are approximately distributed as chi-squared variables
divided by their degrees of freedom, with an expected value of 1,
if the null hypothesis H0 holds.
More generally, the expected heights under H0 are approximately
(1-influence)
, where
influence
is the influence of the
observations in a pattern on the overall estimate of the means;
these expected heights are shown with horizontal lines.
Rectangles which are taller than the corresponding lines indicate
positive contributions to the test statistic.
Also superimposed over each rectangle are points, one for each
observed variable in the pattern, at heights equal to
(1-fraction)
, where
fraction
is the fraction of all observations
for the variable which are found in the pattern.
The lines and points may not be visible on a black and white graphics device.
This function is a method for the generic function
plot
for
the class
"mcar"
. It can be invoked by calling
plot
for
an object of class
"mcar"
, or directly.
Hesterberg, Tim C. (1999).
A Graphical Representation of Little's Test for MCAR.
Technical Report No. 94,
Research Department, Insightful Corporation,
1700 Westlake Ave. N., Suite 500, Seattle, WA 98109.
http://www.insightful.com/Hesterberg/articles/tech94-mi-little.pdf
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.
set.seed(0) x <- longley.x; x[runif(96) > .9] <- NA # random missing data M <- mcar(x) plot(M)