Jinsong Zhao
2012-Apr-03 10:16 UTC
[R] Fisher's LSD multiple comparisons in a two-way ANOVA
Hi there, Is there a function that can do a Fisher's LSD multiple comparisons in a two-way ANOVA? I hope to get a result similar with TukeyHSD(). Especially, I hope to know the significance of comparisons between the interactions of two factors. In the following example: x <- c(76, 84, 78, 80, 82, 70, 62, 72, 71, 69, 72, 74, 66, 74, 68, 66, 69, 72, 72, 78, 74, 71, 73, 67, 86, 67, 72, 85, 87, 74, 83, 86, 66, 68, 70, 76, 78, 76, 69, 74, 72, 72, 76, 69, 69, 82, 79, 81) a <- rep(c("A1","A2"), each = 24) b <- rep(c("B1","B2","B3"), each =8, times = 2) a <- factor(a) b <- factor(b) x.aov <- aov(x~a*b) I hope to obtained the results similar with" http://www.gigawiz.com/images12/twowayrmposthoc.jpg Any suggestions or comments will be really appreciated. Regards, Jinsong
yes. See ?glht in the multcomp package, and the examples using glht in ?MMC in the HH package. Sent from my iPhone On Apr 3, 2012, at 6:16, Jinsong Zhao <jszhao at yeah.net> wrote:> Hi there, > > Is there a function that can do a Fisher's LSD multiple comparisons in a two-way ANOVA? I hope to get a result similar with TukeyHSD(). Especially, I hope to know the significance of comparisons between the interactions of two factors. > > In the following example: > > x <- c(76, 84, 78, 80, 82, 70, 62, 72, 71, 69, 72, 74, 66, 74, 68, 66, 69, 72, 72, 78, 74, 71, 73, 67, 86, 67, 72, 85, 87, 74, 83, 86, 66, 68, 70, 76, 78, 76, 69, 74, 72, 72, 76, 69, 69, 82, 79, 81) > a <- rep(c("A1","A2"), each = 24) > b <- rep(c("B1","B2","B3"), each =8, times = 2) > a <- factor(a) > b <- factor(b) > x.aov <- aov(x~a*b) > > I hope to obtained the results similar with" > > http://www.gigawiz.com/images12/twowayrmposthoc.jpg > > Any suggestions or comments will be really appreciated. > > Regards, > Jinsong > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.