angelo.arcadi at virgilio.it
2015-Jul-06 14:00 UTC
[R] Bonferroni post hoc test in R for repeated measure ANOVA with mixed within and between subjects design
Dear List Members, I need to perform a Bonferroni post hoc test in R on a table with three within subjects factors (Emotion, having 5 levels, Material, having 4 levels, Shoes, having 2 levels) and one between subject factor (Musician, having 2 levels). I normally use the Tukey method with the following formula require(nlme) lme_H2H = lme(H2H ~ Emotion*Material*Shoes*Musician, data=scrd, random = ~1|Subject) require(multcomp) summary(glht(lme_H2H, linfct=mcp(Emotion = "Tukey"))) I am not able to find any reference that explains with an example of R code how to perform a post hoc test with the Bonferroni procedure. Can anyone provide an example to perform the same post hoc test in the code above but with Bonferroni instead of Tukey? Thank you in advance Angelo [[alternative HTML version deleted]]
Meyners, Michael
2015-Jul-06 15:52 UTC
[R] Bonferroni post hoc test in R for repeated measure ANOVA with mixed within and between subjects design
Untested, but if anything, your best bet is likely something like summary(glht(lme_H2H, linfct=mcp(Emotion = "Tukey")), test=adjusted("bonferroni")) should work (despite the question why you'd want to use Bonferroni rather than Tukey For a reference, see the book on the topic by the package authors. Might be in the paper, too, which is given by citation("multcomp") HTH, Michael> -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of > angelo.arcadi at virgilio.it > Sent: Montag, 6. Juli 2015 16:01 > To: r-help at r-project.org > Subject: [R] Bonferroni post hoc test in R for repeated measure ANOVA with > mixed within and between subjects design > > Dear List Members, > > > > I need to perform a Bonferroni post hoc test in R on a table with three within > subjects factors (Emotion, having 5 levels, Material, having 4 levels, Shoes, > having 2 levels) and one between subject factor (Musician, having 2 levels). > > > I normally use the Tukey method with the following formula > > require(nlme) > lme_H2H = lme(H2H ~ Emotion*Material*Shoes*Musician, data=scrd, > random = ~1|Subject) > require(multcomp) > summary(glht(lme_H2H, linfct=mcp(Emotion = "Tukey"))) > > > > I am not able to find any reference that explains with an example of R code > how to perform a post hoc test with the Bonferroni procedure. > Can anyone provide an example to perform the same post hoc test in the > code above but with Bonferroni instead of Tukey? > > > Thank you in advance > > > > Angelo > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.