This article describes how to perform the Kruskal-Wallis rank-sum test to assess whether the population median of at least one group differs from that of at least one other group, assuming identical shape and scale. This test can be used to analyze samples from two or more groups, with equal or unequal sample sizes.
Requirements
A Displayr document with a data set.
Method
- In the Report tree select +> Advanced Analysis > Test > Nonparametric > Kruskal-Wallis Rank Sum Test.
- Specify the outcome variable you want to analyze under Data > Outcome in the object inspector
.
- Under Data > Group, specify the variable that each observation comes from. The Group variable should be categorical, but if your data is numeric, it will be automatically converted and split into approximately equally sized groups using the median.
OPTIONAL: You can adjust the following settings to modify your output:
-
Output
- Summary - Shows a nicely formatted table of the test results (default).
- R - The original text-based output from the kruskal.test function.
- Variable names - Display Variable Names in the output, instead of Variable Labels.
- More decimal places - Display numeric values with 8 decimal places.
UPCOMING WEBINAR: The Roadmap for Market Researchers in the Age of AI