Omphalodes Verna
2012-Dec-15 09:04 UTC
[R] kruskalmc, significant differences while median values are the same
Dear list! I work with multiple Kruskal-Wallis test (kruskalmc, package pgirmess), which evaluates differences in medians among groups (5 groups). A result of a test is significant differences among some groups, while median values are the same for 4 groups (using tapply). Why? p.s.: number of samples in groups vary from 50 to 4900. Thanks to all, OV .
Pascal Oettli
2012-Dec-15 12:59 UTC
[R] kruskalmc, significant differences while median values are the same
Hello, What about the median ranks? This test is based on ranks. Regards, Pascal Le 12/12/15 18:04, Omphalodes Verna a ?crit :> Dear list! > > I work with multiple Kruskal-Wallis test (kruskalmc, package pgirmess), which evaluates differences in medians among groups (5 groups). A result of a test is significant differences among some groups, while median values are the same for 4 groups (using tapply). Why? > > p.s.: number of samples in groups vary from 50 to 4900. > > Thanks to all, OV > > . > > ______________________________________________ > 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. >
Thomas Lumley
2012-Dec-16 22:59 UTC
[R] kruskalmc, significant differences while median values are the same
On Sat, Dec 15, 2012 at 10:04 PM, Omphalodes Verna < omphalodes.verna@yahoo.com> wrote:> Dear list! > > I work with multiple Kruskal-Wallis test (kruskalmc, package pgirmess), > which evaluates differences in medians among groups (5 groups). A result of > a test is significant differences among some groups, while median values > are the same for 4 groups (using tapply). Why? > >The Kruskal-Wallis test *doesn't* evaluate differences in medians, so there is quite likely nothing wrong in a formal sense. However, this does suggest that your groups may not be stochastically ordered, which means the results of the Kruskal-Wallis test could be quite misleading. I'd suggest that you at least look at pairwise Wilcoxon tests to make sure the direction agrees with what the Kruskal-Wallis test implies. Box plots might also be a good idea. Or, if you really want differences in medians, look at differences in medians. A permutation test or a bootstrap confidence interval is probably the best way to do this. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland [[alternative HTML version deleted]]
Omphalodes Verna
2012-Dec-17 06:51 UTC
[R] kruskalmc, significant differences while median values are the same
Thank for help! My ''problem'' is a little bit complicated. I have a dataset of trees (five tree species) and I need to calculate if there are the significant differences in the period of suppressed growth among tree species (length in years, e.g. 1, 2, 3, 6, 10, 50, 80, etc.). Because data are not normally distributed (Levene test), my idea was to use kruskalmc test. ? So, my question is, how to evaluate the differences in the duration of suppressed growth among groups? Is ''bootstrap confidence interval'' for each tree species right solution?? thanks, OV ________________________________ From: Thomas Lumley <tlumley at uw.edu> To: Omphalodes Verna <omphalodes.verna at yahoo.com> Cc: R Help <r-help at r-project.org> Sent: Sunday, December 16, 2012 11:59 PM Subject: Re: [R] kruskalmc, significant differences while median values are the same On Sat, Dec 15, 2012 at 10:04 PM, Omphalodes Verna <omphalodes.verna at yahoo.com> wrote: Dear list!> >I work with multiple Kruskal-Wallis test (kruskalmc, package pgirmess), which evaluates differences in medians among groups (5 groups). A result of a test is significant differences among some groups, while median values are the same for 4 groups (using tapply). Why? > >The Kruskal-Wallis test *doesn't* evaluate differences in medians, so there is quite likely nothing wrong in a formal sense. However, this does suggest that your groups may not be stochastically ordered, which means the results of the Kruskal-Wallis test could be quite misleading. ?I'd suggest that you at least look at pairwise Wilcoxon tests to make sure the direction agrees with what the Kruskal-Wallis test implies. Box plots might also be a good idea. Or, if you really want differences in medians, look at differences in medians. A permutation test or a bootstrap confidence interval is probably the best way to do this. ? ?-thomas -- Thomas Lumley Professor of Biostatistics University of Auckland?? ??