The NPAR1WAY Procedure

One-Way ANOVA Tests

PROC NPAR1WAY computes a one-way ANOVA test for each score type that you specify. Under the null hypothesis of no difference among class levels (samples), this test statistic has an asymptotic chi-square distribution with r – 1 degrees of freedom, where r is the number of class levels. For Wilcoxon scores, this test is known as the Kruskal-Wallis test.

Exact one-way ANOVA tests are also available for multisample data (where the data are classified into more than two levels). For two-sample data, exact simple linear rank tests are available. PROC NPAR1WAY computes exact tests for each score type that you specify in the EXACT statement. See the section Exact Tests for details.

PROC NPAR1WAY computes the one-way ANOVA test statistic as

\[  C = \left( \sum _{i=1}^ r (T_ i - \mr {E_0}(T_ i))^2 ~  / ~  n_ i \right) / ~  S^2  \]

where $T_ i$ is the total of scores for class level i, $\mr {E_0}(T_ i)$ is the expected total for level i under the null hypothesis of no difference among levels, $n_ i$ is the number of observations in level i, and $S^2$ is the sample variance of the scores. The total of scores for class level i is given by

\[  T_ i = \sum _{j=1}^ n c_{ij} ~  a(R_ j)  \]

where $a(R_ j)$ is the score for observation j, and $c_{ij}$ indicates whether observation j is in level i. The expected total of scores for class level i under the null hypothesis is equal to

\[  \mr {E_0}(T_ i) = \frac{n_ i}{n} \sum _{j=1}^ n a(R_ j)  \]

The sample variance of the scores is computed as

\[  S^2 = \frac{1}{(n-1)} \sum _{j=1}^ n \left( a(R_ j) - \bar{a} \right)^2  \]

where $\bar{a}$ is the average score,

\[  \bar{a} = \frac{1}{n} \sum _{j=1}^ n a(R_ j)  \]