Two and Three-Way Interaction Plots for ANOVA

DESCRIPTION:
Plots the predicted means for two and three way interactions, taking account of order of factors specified by the user. Confidence limits for the difference between means can be added. This function is useful for interpreting the results from the analysis of a fractional factorial design.

USAGE:
tfiplot(x, tfi.formula = formula(x), method, clims = T,
           sig = 0.1,  ...)

REQUIRED ARGUMENTS:
x:
an aov object, or more typically, a fac.aov object created from fitting an aov model to a fractional factorial design.

OPTIONAL ARGUMENTS:
tfi.formula:
formula specifying the two and three way interactions to plot. The leftmost factor for each term is on the x-axis: usually best to put the biggest effect on the left. Main effects are ignored. A warning is given if the term is not in the model, and the term is ignored.
method:
character string for error used to calculate confidence limits, if clims = TRUE (see below). Setting method="mse" uses root mean squared error, "pse" uses a pseudo standard error estimate. "tse" uses a 60% trimmed standard error of the effects. "ase" uses an adaptive standard error estimate. The default is "pse" unless "mse" is available.
clims:
logical flag for whether confidence limits of the difference between means should be plotted. If two lines do not overlap, the means are different at sig level of significance.
sig:
if clims=TRUE, 100(1-sig)% confidence limits are shown.
...:
arguments passed to plot.

VALUE:
None.

SIDE EFFECTS:
Interaction plots are created on the current graphics device. All two-factor interactions are plotted in one frame; each three-way interaction is plotted in a separate frame.

DETAILS:
Creates two and three way interaction plots. Each two way interaction plot consists of the predicted means of the response at all combinations of the two experimental factors involved. The levels of the first factor are shown on the x-axis. The response means are connected by different patterned lines for each level of the second factor. The three way interaction plots are similar, except that each two way interaction plot is at different levels of the third factor.

WARNING:
tfiplot.aov computes and plots predicted means via proj. In many cases this will mean refitting the model to obtain the qr component.

REFERENCES:
Haaland, P. D. (1989), Experimental Design in Biotechnology, New York: Marcel Dekker.

SEE ALSO:
fac.aov , fac.aov.object , model.tables.aov .

EXAMPLES:
buffer.fac <- fac.aov(buffer.df)

tfiplot(buffer.fac, ~pH:thimer+pH:gent) # two sets of interactions tfiplot(buffer.fac, ~thimer*pH+pH:gent) # same as above: '*' and ':' # are equivalent in this function tfiplot(buffer.fac, ~pH:thimer+pH:gent, sig=.05) # change sig level

tfiplot(buffer.fac, ~pH:thimer, sig=.05, method="ase") # one interaction tfiplot(buffer.fac, ~pH:thimer, clims=F) # do not plot confidence limits