Solved – How to read the results of Dunn’s test

distributionsdunn-testkruskal-wallis test”r

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

Best Answer

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).