Statistical Analysis for Education and Psychology Researchers

(Jeff_L) #1

makes use of the normal approximations is described by Siegel and Castellan (1988), and
Keselman and Rogan (1977) discuss the relative merits of K-W post hoc procedure
(similar to the multiple comparison procedures described by Siegel and Castallan but
based on the Chi-square distribution) and the Tukey test under varying conditions.


Computer analysis

To perform a Kruskal-Wallis test in SAS, PROC NPAR1WAY is used with the option
wilcoxon. Using this nonparametric ANOVA test on the reading correction data shown in
Table 7.5 the following SAS code would be used:


data a;
input group response @@ ;
cards;
1 22 1 26 1 27 1 22 1 18
2 31 2 30 2 21 2 17 2 21
3 13 3 16 3 21 3 17 3 12
;
**** kruskal-wallis test ****;
proc nparlway data=a wilcoxon;
class group;
var response;
title ‘Kruskal-Wallis test-worked example’;
run;

Data is entered after the cards statement. The group value followed by the response value
is input for each subject. The option wilcoxon performs a Kruskal-Wallis test when there
are more than two groups. The class statement denotes the variable that divides the
observations into independent groups, here there are three groups and each group, for
convenience, is given a numeric value of 1, 2, or 3 (these are only nominal categories, the
class variable does not imply any order). Output from this programme is shown in Figure
7.7.
Kruskal-Wallis test—worked, example
NPAR1WAY Procedure
Wilcoxon Scores Scores (Rank-Sums) for Variable response
Classified by Variable group
GROUP N Sum of Scores Expected Under H0 Std Dev Under H0 Mean Score
1 5 52.0000000 40.0 8.12110713 10.4000000
2 5 49.5000000 40.0 8.12110713 9.9000000
3 5 18.5000000 40.0 8.12110713 3.7000000
Average Scores were used for Ties
Kruskal-Wallis Test (Chi-square Approximation)
CHISQ=7.0404 DF=2 Prob>CHISQ=0.0296


Figure 7.7: Output from PROC


NPAR1WAY for reading correction


data


Statistical analysis for education and psychology researchers 236
Free download pdf