12

How do I read the results from Dunn's test? Specifically, what do the values in the table below tell me?

I have non-parametric data in 4 groups, and I first did a Kruskal-Wallis test to confirm that the groups' distributions were dissimilar from one another and the aggregate dataset. I then used Dunn's test to see which groups were dissimilar from one another, and which were not.

library(dunn.test)
dunn.test(data, g=area, kw=TRUE)
Kruskal-Wallis rank sum test

data: x and area
Kruskal-Wallis chi-squared = 1730.4401, df = 3, p-value = 0


                        Comparison of x by area                            
                            (No adjustment)                                
Row Mean-|
Col Mean |          A          B          C
---------+---------------------------------
       B |   20.62310
         |     0.0000
         |
       C |   26.66519  -0.087499
         |     0.0000     0.4651
         |
       D |   39.09084   7.401256   9.469204
         |     0.0000     0.0000     0.0000

1 Answers1

21

The output following the Kruskal-Wallis test provides all possible pairwise comparisons (six in the case of four groups). So the one on the first row compares group B with group A, the first on the second row compares group C with group A, etc.).

The upper number for each comparison is Dunn's pairwise z test statistic. The lower number is in this example the raw p-value associated with the test (i.e. you would compare to $\alpha/2$, although this p-value changes depending on the family-wise error rate or false discovery rate multiple comparisons adjustment option. For stepwise multiple comparison adjustments (e.g. Holm, Benjamini-Hochberg, etc.), the adjusted p-values will have an asterisk next to them if your would reject the null hypotheses at the specified significance level (which is not necessarily directly indicated by the adjusted p-values since rejection depends on ordering... see the documentation and citations therein for more details.).

I am the author of this package (emailing me, as explicitly indicated in the documentation, would likely be the best way to get in touch with me directly).

Alexis
  • 29,850
  • Sorry if this is taking the question in a different direction, but when would you adjust the test? What criteria are necessary in your data for you to want to choose an adjustment? – pocketlizard Jan 26 '15 at 17:42
  • 1
  • I have seen that the Kruskal-Wallis values obtained with kruskal.test slightly differ from the ones obtained with the option kw=TRUE in the above package. Is this due to some approximations or are they two different things? – gented Sep 21 '15 at 08:35
  • @GennaroTedesco kruskal.test does not adjust for ties, while dunn.test does adjust for ties. As it says in the documentation... just above where it give the email to contact for support questions. – Alexis Sep 22 '15 at 19:03