Re: [R] Post Hoc Groupings

From: P Ehlers <ehlers_at_math.ucalgary.ca>
Date: Thu 27 Oct 2005 - 10:23:14 EST

Jarrett Byrnes wrote:
> Quick question, as I attempt to learn R. For post-hoc tests
>
> 1) Is there an easy function that will take, say the results of
> tukeyHSD and create a grouping table. e.g., if I have treatments 1, 2,
> and 3, with 1 and 2 being statistically the same and 3 being different
> from both
>
> Group Treatment
> A 1
> A 2
> B 3
>
> 2) I've been stumbling over the proper syntax for simple effects for a
> tukeyHSD test. Is it
>
> TukeyHSD(model.aov, "Treatment1", "Treatment2")
> or
> TukeyHSD(model, c("Treatment1", "Treatment2"))
>
> or something else, as neither of those seem to really work.
>

Re question 2, using the example in the help file: fm1 <- aov(breaks ~ wool + tension, data = warpbreaks) TukeyHSD(fm1, c("wool","tension"))

Note that "wool", "tension" must be factors.

[In the help file for TukeyHSD, argument 'which' is defined as a "list" of terms. Maybe that should be changed to a "character vector".]

Peter



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Oct 27 10:28:41 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:47 EST