Assumptions for the Kruskal-Wallis test are that within each sample the observations are independent and identically distributed and the samples are independent of each other. To perform a Kruskal-Wallis test in SAS, the same code was used to produce the Wilcoxon Rank Sum test.

Still use **mpg** data, and say we wish to test whether there are highway mpg (**hwy**) among the cars with different number of cylinders (**cyl**).

proc npar1way data = mpg wilcoxon; class cyl; var hwy; run;

The results indicate that there is a statistically significant difference among the four types of cars (chi-square with three degrees of freedom = 34.0452148.7657, p = <.0001).

*See Also:*