Related Experiment Video
Updated: Apr 23, 2026

Flypub To Study Ethanol Induced Behavioral Disinhibition and Sensitization
Published on: May 18, 2020
A SAS(®) macro implementation of a multiple comparison post hoc test for a Kruskal-Wallis analysis
Alan C Elliott1, Linda S Hynan
1Department of Clinical Sciences, Division of Biostatistics, UT Southwestern Medical Center, Dallas, TX 75390-8822, United States. alan.elliott@utsouthwestern.edu
The Kruskal-Wallis (KW) test identifies group differences but lacks specific comparisons. This study introduces a SAS macro for post hoc tests, offering a nonparametric alternative to parametric methods.
Area of Science:
- Statistics
- Biostatistics
- Nonparametric Statistics
Background:
- Standard one-way ANOVA assumes normal data.
- Kruskal-Wallis (KW) test is used for non-normal data.
- KW test lacks specific post hoc pairwise comparisons.
Purpose of the Study:
- To provide a SAS macro for nonparametric multiple comparison tests.
- To implement post hoc tests following significant Kruskal-Wallis results.
- To compare the proposed nonparametric method with parametric tests.
Main Methods:
- Developed a SAS macro for multiple comparison tests.
- Macro based on significant Kruskal-Wallis results from SAS NPAR1WAY.
- Used Monte-Carlo simulation for comparison.
Main Results:
- The SAS macro facilitates post hoc pairwise comparisons after a significant KW test.
- The nonparametric procedure was compared against common parametric multiple comparison tests.
- Simulation results demonstrated the utility of the nonparametric approach.
Conclusions:
- The developed SAS macro provides a valuable tool for nonparametric multiple comparisons.
- This method is suitable for analyzing data from up to 20 groups.
- Offers a valid alternative to parametric post hoc tests when normality is violated.
Related Concept Videos
One-Way ANOVA: Unequal Sample Sizes
Multiple Comparison Tests
It would be easy to compare two samples using a significance alpha level of 0.05. In other words, there is only one sample pair to be compared. However, it would be difficult to identify a significantly different sample if the number...
Kruskal-Wallis Test
Bonferroni Test
The means of different samples are first paired in all possible combinations.
The null hypothesis of the...
Friedman Two-way Analysis of Variance by Ranks
Comparing the Survival Analysis of Two or More Groups

