heplot3d(mod, ...)
## S3 method for class 'mlm':
heplot3d(mod, terms, hypotheses, term.labels = TRUE,
hyp.labels = TRUE, err.label="Error", variables = 1:3, error.ellipsoid = !add,
factor.means = !add, grand.mean = !add, remove.intercept = TRUE,
type = c("II", "III", "2", "3"), idata=NULL, idesign=NULL,
icontrasts=c("contr.sum", "contr.poly"), imatrix=NULL, iterm=NULL,
manova, size = c("evidence", "effect.size"),
level = 0.68, alpha = 0.05, segments = 40, col = palette()[-1], lwd=c(1, 4),
shade=TRUE, shade.alpha=0.1, wire=c(TRUE,FALSE),
bg.col = c("white", "black"), fogtype = c("none", "exp2", "linear", "exp"),
fov = 30, offset = 0.01, xlab, ylab, zlab, xlim, ylim, zlim, add = FALSE, verbose = FALSE,
warn.rank = FALSE, ...)"mlm".TRUE, defaults to all terms;
if FALSE, no terms are plotted.linearHypothesis function in the car package;
the list eTRUE (the default) the names of the terms are used;
if FALSE, term labels are not plotted.TRUE (the default) the names of components of the list of
hypotheses are used; if FALSE, hypothesis labels are not plotted.1:3.TRUE, plot the error ellipsoid; defaults to TRUE,
if the argument add is FALSE (see below).TRUE or FALSE; defaults to TRUE,
if the argument add is FALSE (see below).TRUE, plot the centroid for all of the data;
defaults to TRUE,
if the argument add is FALSE (see below).TRUE (the default), do not plot the
ellipsoid for the intercept even if it is in the MANOVA table."II", "III", "2", or "3", where "II" is
the default (and "2" is a synomym).Anova for an explanation of the intra-subject design aidata and idesign, you can specify the
intra-subject design matrix directly via imatrix, in the form of list of named elements.
Each element gives
the columns of the within-subject model matriterm effect as well as all interactions
of Anova.mlm object for the model; if absent a
MANOVA is computed. Specifying the argument can therefore save
computation in repeated calls."evidence", the default, the scaling is done so that
a ``significant'' hypothesis elliposid extends outside of the error
ellipsoid; if "effect.size0.68.size="evidence", then the
hypothesis ellipsoid is scaled so that it just touches the error ellipsoid at the
specified alpha level; a larger hypothesis elllipsoid ther40.c(1, 4).shade3d. Works like col, except that FALSE
is used for any 1 df degenerate ellipshade=TRUE.wire3d. Works like col, except that TRUE
is used for any 1 df degenerate ellipsoid"white" or "black", defaulting
to "white"."none". See bg.viewpoint.0.01.TRUE, add to the current plot; the default is FALSE.
If TRUE, the error ellipsoid is neither plotted nor returned in the output object.TRUE, print the MANOVA table and details of hypothesis
tests; the default is FALSE.TRUE, do not suppress warnings about the rank of the
hypothesis matrix when the ellipsoid collapses to an ellipse or line;
the default is FALSE.heplot3d invisibly returns a list containing the bounding boxes of the error (E)
ellipsoid and for each term or linear hypothesis specified in the call.
Each of these is a 2 x 3 matrix with rownames "min" and "max" and colnames
corresponding to the variables plotted. An additional component, center,
contains the coordinates of the centroid in the plot.
The function also leaves an object named
.frame in the global environment, containing the rgl object IDs for
the axes, axis labels, and bounding box; these are deleted and the axes, etc.
redrawn if the plot is added to.play3d
and movie3d for details on creating animations.
The arguments xlim, ylim, and zlim can be used to expand the bounding
box of the axes, but cannot decrease it.Anova, linearHypothesis, for details on MANOVA tests and
linear hypotheses
heplot, pairs.mlm, for other plotting methods for mlm objects
rgl-package, for details about 3D plots with rgl
heplot3d.candisc for 3D HE plots in canonical space.# Soils data, from car package
soils.mod <- lm(cbind(pH,N,Dens,P,Ca,Mg,K,Na,Conduc) ~ Block + Contour*Depth, data=Soils)
Anova(soils.mod)
heplot(soils.mod, variables=c("Ca", "Mg"))
pairs(soils.mod, terms="Depth", variables=c("pH", "N", "P", "Ca", "Mg"))
heplot3d(soils.mod, variables=c("Mg", "Ca", "Na"), wire=FALSE)
# Plastic data
plastic.mod <- lm(cbind(tear, gloss, opacity) ~ rate*additive, data=Plastic)
heplot3d(plastic.mod, col=c("red", "blue", "brown", "green3"), wire=FALSE)Run the code above in your browser using DataLab