Chapter Contents |
Previous |
Next |
The FREQ Procedure |
The Jonckheere-Terpstra test is appropriate for a contingency table in which an ordinal column variable represents the response. The row variable, which can be nominal or ordinal, represents the classification variable. The levels of the row variable should be ordered according to the ordering you want the test to detect. The order of variable levels is determined by the ORDER= option in the PROC FREQ statement. The default is ORDER=INTERNAL, which orders by unformatted values. If you specify ORDER=DATA, PROC FREQ orders values according to their order in the input data set. For more information on how to order variable levels, see the ORDER= option.
The Jonckheere-Terpstra test statistic is computed by first forming R(R-1)/2 Mann-Whitney counts Mi,i', where i < i', for pairs of rows in the contingency table,
where Xi,j is response j in row i. Then the Jonckheere-Terpstra test statistic is computed as
This test rejects the null hypothesis of no difference among classes for large values of J. Asymptotic p-values for the Jonckheere-Terpstra test are obtained by using the normal approximation for the distribution of the standardized test statistic. The standardized test statistic is computed as
where E0(J) and var0(J) are the expected value and variance of the test statistic under the null hypothesis.
where
In addition to this asymptotic test, PROC FREQ can compute the exact Jonckheere-Terpstra test, which you request by specifying the JT option in the EXACT statement. See the section "Exact Statistics" for information on exact tests.
PROC FREQ computes one-sided and two-sided p-values for the Jonckheere-Terpstra test. When the standardized test statistic is greater than its null hypothesis expected value of zero, PROC FREQ computes the right-sided p-value, which is the probability of a larger value of the statistic occurring under the null hypothesis. A small right-sided p-value supports the alternative hypothesis of increasing order from row 1 to row R. When the standardized test statistic is less than or equal to zero, PROC FREQ computes the left-sided p-value. A small left-sided p-value supports the alternative of decreasing order from row 1 to row R.
The one-sided p-value P1 can be expressed as
The two-sided p-value P2 is computed as
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.