File Exchange

image thumbnail

Dunn's test

version by Giuseppe Cardillo
Dunn's procedure for multiple, non parametric, comparisons


Updated 15 Apr 2018

GitHub view license on GitHub

Dunn's test is the not parametric analog of Holm-Sidak multiple t-test. When you use the Kruskal-Wallis test, you know if there is a difference among your groups, but you can't apply the KWtest for each couple because the overall error is >alpha (Bonferroni inequality). By Dunn's test you can highlight where is the difference using multiple, stepdown comparisons. The algorithm requires the Statistics Toolbox.

Cite As

Giuseppe Cardillo (2020). Dunn's test (, GitHub. Retrieved .

Comments and Ratings (8)

Hi, MATLAB's multcompare supports 'dunn-sidak' option, but that is not the same as "Dunn's test" provided here, right?

I would need a p-value for each comparison to plot it as function of an independent variable. Practically speaking I would need to convert the q-value in a p-value... Should I use a z-table?

Why? It is a metod to test GLOBAL p-value<=alpha (usually 0.05)

Hi, is there a method to extract a p-value for each comparison?

Very clear! this code is written intelligently ,thanks.

Abdallah Makhlof

thank you

Ozan Akkus

The code is writen very clearly, instructions are detailed and to the point. It did not take me more than 5 minutes to get run the test.

Cyro Junior

Very good software. I need for my original article from univesity


inputparser; table implementation; github link

Changes in description

Correct the pointing to the N vector

fixed an error in the computation of denom in Qvalue.

Logical indexing improved

Changes in help section

Improvement in input error handling

the file was in a wrong category

I fixed a bug in ties correction. Some minor corrections.

Logical indexing implemented

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux