0
$\begingroup$

Why does the Kruskal Wallis test shows a difference but Wilcoxon doesn´t find any between the groups, even tough the rank medians which are tested as far as I know look very different, and Dunn test as post hoc finds a difference?

Does it have to do with sample size n<5 so no chi-squared distribution?

Here is my test data for R + dunn.test library

test <- data.frame(TR=c("A","B","A","A","C","B","B","C","C","D","D","D"),REP=c(3,1,1,2,3,2,3,1,2,1,3,2),VAL=c(22,88,24,38,24,72,72,29,15,14,21,17))
attach(test)
boxplot(VAL~TR)
TR<-as.factor(TR)
shapiro.test(VAL)
kruskal.test(VAL~TR)
pairwise.wilcox.test(VAL,TR,p.adj='bonferroni')
dunn.test(VAL,TR, method = "bonferroni",altp=TRUE)
$\endgroup$
5
  • 1
    $\begingroup$ Possible duplicate of Non-significant Kruskal-Wallis and significant post hoc tests $\endgroup$
    – Alexis
    Oct 31, 2019 at 20:53
  • $\begingroup$ No, this is not necessarily a duplicate. The other question was asking if it was appropriate to exclude p-values for post-hoc pairwise comparisons with a nonsignificant omnibus test. The question in this thread is asking more for an explanation of why this might occur that the omnibus is significant but none of the pairwise comparisons are significant. This is different. The OP should look at the literature on appropriate pairwise comparisons after a KW test-- Wilcoxon rank sum is not necessarily the right approach. $\endgroup$
    – LSC
    Oct 31, 2019 at 20:59
  • $\begingroup$ Also possibly relevant Mann-Whitney (2 groups) contradicted by Kruskal-Wallis (3 groups) (I mean aside from the issue that the Mann-Whitney test is inappropriate as a post hoc test for Kruskal-Wallis.) $\endgroup$
    – Alexis
    Oct 31, 2019 at 21:16
  • $\begingroup$ Aside: different implementations of post hoc tests use different methods with different degrees of fidelity with respect to the seminal papers in which the tests were advanced: What is the difference between various Kruskal-Wallis post-hoc tests? $\endgroup$
    – Alexis
    Oct 31, 2019 at 21:26
  • $\begingroup$ The issue of individual pairwise comparisons not exactly corresponding to the overall test happens even with say one-way anova. The non-rejections regions of the two kinds of test don't exactly correspond - they deal with slightly different questions. It's quite possible to get rejection with one but not the other, or vice versa. $\endgroup$
    – Glen_b
    Oct 31, 2019 at 23:57

1 Answer 1

1
$\begingroup$

The Mann-Whitney-Wilcoxon rank-sum test is inappropriate for post hoc pairwise tests following the rejection of the Kruskal-Wallis null hypothesis because

(1) the rank-sum test uses different rankings of the data than were used in the Kruskal-Wallis test

(2) the rank-sum test does not use the pooled variance estimate implied by the Kruskal-Wallis null hypothesis.

By contrast Dunn's test (and the more powerful Conover-Iman test) do use the same rankings, and do use pooled variance estimates. We would therefore not expect to be surprised when the results of the rank-sum and the actual post hoc tests do differ.

$\endgroup$
3
  • $\begingroup$ Thanks a lot for your answer! Is there any reason to not use the conover.test because dunn.test is the most refered to poc host test for kruskal wallis? $\endgroup$
    – Markie
    Oct 31, 2019 at 21:42
  • $\begingroup$ @Markie Not in my book. The Conover-Iman test is just less well known. It gets it's power from constructing a t-test rather than a z-test (like Dunn's). $\endgroup$
    – Alexis
    Oct 31, 2019 at 23:27
  • $\begingroup$ Awesome, thanks again! $\endgroup$
    – Markie
    Nov 1, 2019 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.