Plot all main effects and twoway interactions in a multifactor design
This is the panel function for interaction2wt
. 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.
panel.interaction2wt(x, y, subscripts, responselab, trace.values, factor.levels, factor.position, fun = mean, se, type="l", ..., box.ratio, simple=FALSE, simple.offset, simple.scale, simple.pch, data.x, col.by.row=TRUE, key.in=NULL) strip.interaction2wt(which.given, which.panel, var.name, factor.levels, shingle.intervals, strip.names = c(TRUE, TRUE), style = 1, ...)
panel.interaction2wt
arguments:
x |
levels of x-factor |
y |
Summary value of response variable at each level of x- and trace-factors. |
subscripts |
used to get the right set of response values for the summary statistics on the off-diagonals |
responselab |
Character name of response variable, defaults to the name of the response variable. |
trace.values |
levels of trace-factor |
fun |
Summary function, defaults to |
se |
standard errors to be passed to |
,
type |
See |
,
box.ratio |
passed to |
,
... |
extra arguments, primarily color,
to be passed to |
key.in |
S-Plus only. Arguments to be passed through to the |
factor.position |
|
simple |
logical. If |
simple.offset, simple.scale |
named list of offset and scale for the
response and trace factors. |
simple.pch |
Named list containing plotting characters for each
level of one or more of the factors. |
data.x |
|
col.by.row |
logical. If |
strip.interaction2wt
arguments
which.given, which.panel, var.name, factor.levels,
shingle.intervals |
see documentation
for |
.
strip.names |
Force |
style |
force |
Richard M. Heiberger <rmh@temple.edu>
Heiberger, Richard M. and Holland, Burt (2015). Statistical Analysis and Data Display: An Intermediate Course with Examples in R. Second Edition. Springer-Verlag, New York. https://www.springer.com/us/book/9781493921218
## Not run: tmp <- data.frame(y=rnorm(48), A=factor(rep(1:2, 24)), B=factor(rep(rep(1:3, each=2), 8)), C=factor(rep(rep(1:4, each=6), 2))) interaction2wt(y ~ A+B+C, data=tmp, key.in=list(x=-3), ## key.in is ignored by R xlim=c(.4, 4.5)) interaction2wt(y ~ B+C, data=tmp, key.in=list(x=-2), xlim=c(.4, 4.5)) position(tmp$B) <- c(1, 2.4, 3.8) interaction2wt(y ~ B+C, data=tmp, key.in=list(x=-2), xlim=c(.4, 4.5)) interaction2wt(y ~ B+C, data=tmp, simple=TRUE, simple.scale=list(B=.18, C=.27), box.ratio=.2, key.in=list(x=-2), xlim=c(.4, 4.5)) interaction2wt(y ~ C+B, data=tmp, simple=TRUE, simple.scale=list(B=.18, C=.27), box.ratio=.2, key.in=list(x=-2), xlim=c(.4, 4.5)) interaction2wt(y ~ B+C, data=tmp, simple=TRUE, simple.scale=list(B=.18, C=.27), box.ratio=.2, simple.pch=list(C=c(16,17,18,19)), key.in=list(x=-2), xlim=c(.4, 4.5)) interaction2wt(y ~ C+B, data=tmp, simple=TRUE, simple.scale=list(B=.18, C=.27), box.ratio=.2, simple.pch=list(C=c(16,17,18,19)), key.in=list(x=-2), xlim=c(.4, 4.5)) interaction2wt(y ~ C+B, data=tmp, simple=TRUE, simple.scale=list(B=.18, C=.27), box.ratio=.2, simple.pch=list(A=c(1:2), B=c(3:5), C=c(16,17,18,19)), key.in=list(x=-2), xlim=c(.4, 4.5)) interaction2wt(y ~ C+B, data=tmp, simple=TRUE, simple.scale=list(B=.18, C=.27), box.ratio=.2, simple.pch=list(A=c(1:2)), key.in=list(x=-2), xlim=c(.4, 4.5)) interaction2wt(y ~ B+C, data=tmp, simple=TRUE, simple.scale=list(B=.18, C=.27), box.ratio=.2, simple.pch=list(B=c(16,17,18)), key.in=list(x=-2), xlim=c(.4, 4.5), se=TRUE) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.