interaction2wt

From HH v1.18-1
0th

Percentile

Plot all main effects and twoway interactions in a multifactor design

The main diagonal displays boxplots for the main effects of each factor. The off-diagonals show the interaction plots for each pair of factors. The i,j panel shows the same factors as the j,i but with the trace- and x-factor roles interchanged.

Keywords
hplot, design
Usage
interaction2wt(x, ...)

## S3 method for class 'formula':
interaction2wt(x, data = sys.parent(), responselab, ...)

## S3 method for class 'default':
interaction2wt(x,
response.var,
responselab = deparse(substitute(y)),
relation = list(x = "same", y = "same"),
x.relation = relation$x, y.relation = relation$y,
digits = 3,
x.between = 1,
y.between = 1,
cex = 0.75,
panel.input = panel.interaction2wt,
strip.input = strip.interaction2wt,
par.strip.text.input = list(cex = 0.7),
main.in =
paste(responselab,
": main effects and 2-way interactions",
sep = ""),
xlab = list(labels = ""),
ylab = list(labels = ""),
simple=FALSE,
box.ratio=if (simple) .32 else 1,
...,
main.cex)
Arguments
x
The object on which method dispatch is carried out. For the "formula" method, a formula describing the response variable and factors. The formula is generally of the form y ~ g1 + g2 + .... There may be one
data
For the formula method, a data frame containing values for any variables in the formula. In the R version, if not found in data, or if data is unspecified, the variables are looked for in the env
responselab
Character name of response variable, defaults to the name of the response variable in the formula.
...
additional arguments, primarily trellis arguments.
response.var
For the "default" method, the response variable. This is usually constructed by formula method from the input data and the input formula.
simple
logical. TRUE if simple effects are to be displayed. Arguments simple.offset, simple.scale, and col.by.row may also be needed. See pan
box.ratio
bwplot in R or bwplot in S-Plus.
relation
trellis argument.
x.relation
x value of relation argument.
y.relation
y value of relation argument.
digits
doesn't do anything at the moment
x.between
x value of relation argument.
y.between
y value of relation argument.
cex
S-Plus: changes the size of the median dot in the boxplots. R: doesn't do anything.
panel.input
panel function. Default is panel.interaction2wt.
strip.input
strip function. Default is strip.interaction2wt.
par.strip.text.input
par.strip.text argument.
additional arguments to scales argument.
main.in
Text of main title.
xlab
No effect.
ylab
No effect.
main.cex
cex for main title.
Value

• "trellis" object containing the plot.

References

Heiberger, Richard M. and Holland, Burt (2004b). Statistical Analysis and Data Display: An Intermediate Course with Examples in S-Plus, R, and SAS. Springer Texts in Statistics. Springer. ISBN 0-387-40270-5.

panel.interaction2wt

Aliases
• interaction2wt
• interaction2wt.formula
• interaction2wt.default
Examples
vulcan$filler <- factor(vulcan$filler)
position(vulcan$raw) <- (1:4)+.5 position(vulcan$pretreat) <- 2:4
interaction2wt(wear ~ filler + pretreat + raw, data=vulcan)
interaction2wt(wear ~ filler + raw, data=vulcan,
simple=TRUE)
interaction2wt(wear ~ filler + raw, data=vulcan,
simple=TRUE, simple.scale=c(filler=.15, raw=.2))

if.R(r={
ToothGrowth <- ToothGrowth  ## local copy
ToothGrowth$dose <- positioned(ToothGrowth$dose) ## modify local copy
print(
anova(aov(len ~ supp*dose, data=ToothGrowth))
)
print(
interaction2wt(len ~ supp + dose, data=ToothGrowth)
)
print(
bwplot(len ~ supp | unpositioned(dose), data=ToothGrowth, layout=c(3,1))
)
print(
bwplot(len ~ dose | supp, data=ToothGrowth, layout=c(2,1),
box.ratio=.5,
panel=panel.bwplot.intermediate.hh,
scales=list(x=list(at=position(ToothGrowth$dose)))) ) print( bwplot(len ~ dose | supp, data=ToothGrowth, layout=c(2,1), box.ratio=.5, scales=list(x=list(at=position(ToothGrowth$dose))))
)
}, s={})
Documentation reproduced from package HH, version 1.18-1, License: GPL version 2 or newer

Community examples

Looks like there are no examples yet.