[R] R: RE: Bonferroni post hoc test in R for repeated measure ANOVA with mixed within and between subjects design

John Fox jfox at mcmaster.ca
Tue Jul 7 03:23:30 CEST 2015


Dear Angelo,

The Bonferroni p-value is just the ordinary p-value times the number of tests, so, since R supports multiplication, you can apply the Bonferroni adjustment in R. Because Bonferroni tests for multiple comparisons can be very conservative, asking why you want to use them is a fair question.

Best,
 John

------------------------------------------------
John Fox, Professor
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/
	
	
	
On Tue, 7 Jul 2015 00:50:49 +0200 (CEST)
 "angelo.arcadi at virgilio.it" <angelo.arcadi at virgilio.it> wrote:
> Dear Michael,
> thank you for your answer, however, I am not asking for the tukey
> with the bonferroni adjustment, but doing the post hoc with the bonferroni method.
> Apparently this is done easily in SPSS, I am wondering whether it is possible with R.
> 
> Can anyone help me?
> 
> Thanks in advance
> 
> 
> Angelo
> 
> 
> 
> ----Messaggio originale----
> Da: meyners.m at pg.com
> Data: 6-lug-2015 17.52
> A: "angelo.arcadi at virgilio.it"<angelo.arcadi at virgilio.it>, "r-help at r-project.org"<r-help at r-project.org>
> Ogg: RE: [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.
> 
> 
> 
>    
> 	[[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.



More information about the R-help mailing list