[R] customization of pairwise comparison plots

From: Levi Waldron <leviwaldron_at_gmail.com>
Date: Thu, 01 May 2008 13:42:39 -0400

I am wondering how to customize a pairwise comparisons plot of a factorial ANOVA, without doing a lot of manual manipulation of a TukeyHSD object. The customizations I'd like are:

  1. The aov used log-transformed response data, but I'd like to plot the intervals on their original, untransformed scales
  2. Plot all the main and interaction effects together, rather than in a separate window for each.
  3. Omit certain comparisons, specifically interactions without some common level. ie plot A1:B1 - A1:B2, but not A1:B2 - A3:B4.

For example (I know not a valid one since the factor wool isn't significant, and it doesn't need to be log-transformed):

> data(warpbreaks)
> summary(fm1 <- aov(log(breaks) ~ wool*tension, data = warpbreaks))

             Df Sum Sq Mean Sq F value   Pr(>F)
wool          1 0.3125  0.3125  2.2344 0.141511
tension       2 2.1762  1.0881  7.7792 0.001185 **
wool:tension 2 0.9131 0.4566 3.2642 0.046863 * Residuals 48 6.7138 0.1399
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

The general features of plot(fm1) are good but I'd like to plot all the
comparisons together in one plot, on the original scale, skipping the
comparisons B:M-A:L, B:H-A:L, A:M-B:L, A:H-B:L, B:H-A:M, A:H-B:M while
keeping the rest of the interaction comparisons.  Advice on any of these, if
not all, would be much appreciated.

	[[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 01 May 2008 - 18:23:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 01 May 2008 - 19:30:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive