Hi! I need to perform a Mann-Whitney test using Bonferroni correction. I found the function pairwise.wilcox.test. However, my data have ties. I know that when there are ties is better to perform Mann Whitney test using the function wilcox.exact. How can include in that the Bonferroni correction? thank you for your help! netrunner -- View this message in context: http://n4.nabble.com/exact-wilcox-test-and-Bonferroni-correction-tp1099893p1099893.html Sent from the R help mailing list archive at Nabble.com.
Meyners, Michael, LAUSANNE, AppliedMathematics
2010-Jan-22 10:55 UTC
[R] exact wilcox test and Bonferroni correction
?p.adjust Apply that to a vector containing all p values you get from wilcox.exact. Alternatively, multiply each p value by the number of comparisons you perform, see any textbook for that. You might want to consider a less conservative correction, though. HTH, Michael> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of netrunner > Sent: Freitag, 22. Januar 2010 10:41 > To: r-help at r-project.org > Subject: [R] exact wilcox test and Bonferroni correction > > > Hi! > I need to perform a Mann-Whitney test using Bonferroni > correction. I found the function pairwise.wilcox.test. > However, my data have ties. I know that when there are ties > is better to perform Mann Whitney test using the function > wilcox.exact. How can include in that the Bonferroni correction? > > thank you for your help! > > netrunner > -- > View this message in context: > http://n4.nabble.com/exact-wilcox-test-and-Bonferroni-correction-tp1099893p1099893.html> Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. >
Dear Michael, thank you very much for your help. I perfomed the wilcox.exact function on each of the 8 items for the two groups that I am analysing (that is, I performed 8 times the wilcox test). Here an example for the values (ratings from a questionnaire) of one of the 8 items: a1=5 9 10 10 10 10 10 10 10 10 b1=7 5 10 NaN 10 10 8 10 10 8 9 9 wilcox.exact(a1,b1, alternative="two.sided", mu=0, paired=FALSE, exact=TRUE, conf.level=0.95) I obtained: data: a1 and b1 W = 73.5, p-value = 0.1514 alternative hypothesis: true mu is not equal to 0 Then I adjusted p-values using p.adjust. For the example above the p-bonferroni value was 1. The threshold p-value is 0.00625 (that is 0.05/8) Finally, because p-bonferroni > 0.00625 can I conclude that for each item my samples are from the same distribution? I am a little bit confused.... thank you! netrunner -- View this message in context: http://n4.nabble.com/exact-wilcox-test-and-Bonferroni-correction-tp1099893p1100077.html Sent from the R help mailing list archive at Nabble.com.