Nemenyi test for post-hoc comparisons

Modified on Sat, 31 Dec 2022 at 10:38 AM

What is the Nemenyi test?


The Nemenyi test is a post-hoc statistical test that can be used to determine which groups are significantly different from each other after an initial Kruskal-Wallis test has been performed.


ANOVA (analysis of variance) or Kruskal-Wallis test are statistical tests that are used to compare the means of two or more groups. They are used to determine if there are significant differences between the groups. If the test is significant, it indicates that there is a difference between the means of the groups, but it does not tell you which groups are significantly different from each other.


This is where the Nemenyi test comes in. It is a multiple comparison test that is used to identify which pairs of groups are significantly different from each other. It creates a graph called a "critical difference plot" that shows the difference between the means of each pair of groups, along with a "critical difference" line. If the difference between the means of a pair of groups is greater than the critical difference, then the groups are considered significantly different.


Overall, the Nemenyi test is a useful tool for identifying which groups are significantly different from each other after an initial Kruskal-Wallis test has been performed. It can help you understand the results of your statistical analysis and draw meaningful conclusions from your data.


How to perform a Nemenyi test?


To use the Dunn-Bonferroni test, you need to have data that are organized into groups and have at least two groups with at least two measurements in each group. You would then run a Kruskal-Wallis test to assess for significant differences between the groups. If the Kruskal-Wallis indicates that there are significant differences between the groups, you can use the Nemenyi test to identify which pairs of means are significantly different from each other.


  1. Open the menu "Statistics" and click on "Test variables"
  2. Select a Numeric variable
  3. Select a List variable. This variable should be composed of at least 3 modalities
  4. Open the panel "Compare values of ... (Kruskal-Wallis)"
  5. If the p-value of the test is below the significance threshold (usually p<0.05), the Nemenyi test is performed automatically


The Nemenyi test is not performed, why?


There are several reasons why the Dunn-Bonferroni test would not be performed:


  1. The p-value of the Kruskal-Wallis test is not below the significance threshold (p>0.05). In this case, it is not recommended to perform a Nemenyi test
  2. An ANOVA has been performed instead of a Kruskal-Wallis. In this case, a Dunn-Bonferroni test is used instead of a Nemenyi test to compare groups
  3. The variables you have chosen are not appropriate for a Kruskal-Wallis. Indeed, 2 variables are required: a Numeric variable and a List variable with at least 3 modalities
  4. You do not have enough data to perform these kinds of tests

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article