Dear R users, I would like to know if there is a way in R to execute a post-hoc test (factor levels comparison, like Tukey for ANOVA) of a non-parametric analysis of variance with kruskal.test() function. I am comparing three different groups. The preliminary analysis using the kruskal-wallis-test show significance, but I still don''t know the relationship and the significance level between each group? Do you have any suggestion? Many thanks in advance! Robert ___________________________________________ Robert M. Kalicki, MD Postdoctoral Fellow Department of Nephrology and Hypertension Inselspital University of Bern Switzerland Address: Klinik und Poliklinik für Nephrologie und Hypertonie KiKl G6 Freiburgstrasse 15 CH-3010 Inselspital Bern Tel +41(0)31 632 96 63 Fax +41(0)31 632 14 58 [[alternative HTML version deleted]]
Meyners, Michael, LAUSANNE, AppliedMathematics
2009-Oct-14 08:29 UTC
[R] post-hoc test with kruskal.test()
Robert, you can do the corresponding paired comparisons using wilcox.test. As far as I know, there is no such general correction as Tukey's HSD for the Kruskal-Wallis-Test. However, if you have indeed only 3 groups (resulting in 3 paired comparisons), the intersection-union principle and the theory of closed test procedures should allow you to do these test without further correction, given the global test was statistically significant. HTH, Michael> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Robert Kalicki > Sent: Mittwoch, 14. Oktober 2009 09:17 > To: r-help at r-project.org > Subject: [R] post-hoc test with kruskal.test() > > Dear R users, > > I would like to know if there is a way in R to execute a > post-hoc test (factor levels comparison, like Tukey for > ANOVA) of a non-parametric analysis of variance with > kruskal.test() function. I am comparing three different > groups. The preliminary analysis using the > kruskal-wallis-test show significance, but I still don't know > the relationship and the significance level between each group? > > > > Do you have any suggestion? > > > > Many thanks in advance! > > > > Robert > > > > > > ___________________________________________ > Robert M. Kalicki, MD > > Postdoctoral Fellow > > Department of Nephrology and Hypertension > > Inselspital > > University of Bern > > Switzerland > > > > Address: > > Klinik und Poliklinik f?r Nephrologie und Hypertonie > > KiKl G6 > > Freiburgstrasse 15 > > CH-3010 Inselspital Bern > > > > Tel +41(0)31 632 96 63 > > Fax +41(0)31 632 14 58 > > > > > [[alternative HTML version deleted]] > >
There is a post hoc test along the lines of the Kruskal-Wallis test. It is implemented on the help page of oneway_test from package coin. The authors of the package, Hothorn, Hornik, van de Wiel, and Zeileis, cite Hollander and Wolfe (1999) for details and say it is called the NemenyiDDamico-Wolfe-Dunn test. Or see nparcomp function in package nparcomp. There is also a post hoc test for the situation where a Friedman test has been done, and that is seen on the help page for SymmetryTests in package coin: the Wilcoxon-Nemenyi-McDonald-Thompson test: http://finzi.psych.upenn.edu/R/library/coin/html/SymmetryTests.html There is also an option of using the MTP function in the multtest package. http://finzi.psych.upenn.edu/R/library/multtest/html/MTP.html -- David Winsemius On Oct 14, 2009, at 3:17 AM, Robert Kalicki wrote:> Dear R users, > > I would like to know if there is a way in R to execute a post-hoc test > (factor levels comparison, like Tukey for ANOVA) of a non-parametric > analysis of variance with kruskal.test() function. I am comparing > three > different groups. The preliminary analysis using the kruskal-wallis- > test > show significance, but I still don't know the relationship and the > significance level between each group? > > Do you have any suggestion?-- David Winsemius, MD Heritage Laboratories West Hartford, CT
Meyners, Michael, LAUSANNE, AppliedMathematics
2009-Oct-14 12:32 UTC
[R] post-hoc test with kruskal.test()
Robert, What do you mean by "not symmetric"? If you mean unbalanced in terms of sample size, that's not a problem if you choose the right specifications for wilcox.test. The Kruskal-Wallis-Test is a generalization of the unpaired Wilcoxon test for more than two groups. Not sure whether kruskal.test works with just two groups, but if so, it should give the same results as wilcox.test if you set the arguments accordingly. Having said that, I should mention that unlike some normality-based post-hoc tests, the proposed approch is not based on a common error term. The paired comparisons will ignore the fact that you had a third group, and this will in particular result in (possibly quite) different power of the three comparisons, depending on the sample sizes and the noise given in just these two groups. I wouldn't know what to do about that, though. Michael> -----Original Message----- > From: Robert Kalicki > Sent: Mittwoch, 14. Oktober 2009 14:11 > To: Meyners,Michael,LAUSANNE,AppliedMathematics > Subject: RE: [R] post-hoc test with kruskal.test() > > Hi Michael, > Thank you very much for your clear and prompt answer. > Is it still valid if I use an unpaired comparison with > wilcox.test() since my groups are not symmetric. > Many thanks > > Robert > > -----Message d'origine----- > De?: Meyners,Michael,LAUSANNE,AppliedMathematics > Envoy??: mercredi 14 octobre 2009 10:30 > ??: Robert Kalicki; r-help at r-project.org Objet?: RE: [R] > post-hoc test with kruskal.test() > > Robert, > > you can do the corresponding paired comparisons using > wilcox.test. As far as I know, there is no such general > correction as Tukey's HSD for the Kruskal-Wallis-Test. > However, if you have indeed only 3 groups (resulting in > 3 paired comparisons), the intersection-union principle and > the theory of closed test procedures should allow you to do > these test without further correction, given the global test > was statistically significant. > > HTH, Michael > > > > > -----Original Message----- > > From: r-help-bounces at r-project.org > > [mailto:r-help-bounces at r-project.org] On Behalf Of Robert Kalicki > > Sent: Mittwoch, 14. Oktober 2009 09:17 > > To: r-help at r-project.org > > Subject: [R] post-hoc test with kruskal.test() > > > > Dear R users, > > > > I would like to know if there is a way in R to execute a > post-hoc test > > (factor levels comparison, like Tukey for > > ANOVA) of a non-parametric analysis of variance with > > kruskal.test() function. I am comparing three different groups. The > > preliminary analysis using the kruskal-wallis-test show > significance, > > but I still don't know the relationship and the significance level > > between each group? > > > > > > > > Do you have any suggestion? > > > > > > > > Many thanks in advance! > > > > > > > > Robert > > > > > > > > > > > > ___________________________________________ > > Robert M. Kalicki, MD > > > > Postdoctoral Fellow > > > > Department of Nephrology and Hypertension > > > > Inselspital > > > > University of Bern > > > > Switzerland > > > > > > > > Address: > > > > Klinik und Poliklinik f?r Nephrologie und Hypertonie > > > > KiKl G6 > > > > Freiburgstrasse 15 > > > > CH-3010 Inselspital Bern > > > > > > > > Tel +41(0)31 632 96 63 > > > > Fax +41(0)31 632 14 58 > > > > > > > > > > [[alternative HTML version deleted]] > > > > > >