Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The FREQ Procedure

Jonckheere-Terpstra Test

The JT option in the TABLES statement requests the Jonckheere-Terpstra test, which is a nonparametric test for ordered differences among classes. It tests the null hypothesis that the distribution of the response variable does not differ among classes. It is designed to detect alternatives of ordered class differences, which can be expressed as \tau_{1} \leq \tau_{2} \leq  ...  \leq \tau_{R}(or \tau_{1} \geq \tau_{2} \geq  ...  \geq \tau_{R}), with at least one of the inequalities being strict, where \tau_{i} denotes the effect of class i. For such ordered alternatives, the Jonckheere-Terpstra test can be preferable to tests of more general class difference alternatives, such as the Kruskal - Wallis test (requested by the option WILCOXON in the NPAR1WAY procedure). Refer to Pirie (1983) and Hollander and Wolfe (1973) for more information about the Jonckheere-Terpstra test.

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,

M_{i,i^' & =  \{ & {\rm number of
 times}
 X_{i,j} \lt X_{i^',j^', \ & & j=1, .....
 ...mes}
 X_{i,j} = X_{i^',j^',  \ & & j=1, ... ,n_{i.}; 
 j^'=1, ... ,n_{i^'.}
  \}

where Xi,j is response j in row i. Then the Jonckheere-Terpstra test statistic is computed as

J  =  \sum_{1 \leq i \lt} \sum_{i^' \leq R}
 M_{i,i^'

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

J^*  =  \frac {J - E_{0}(J)}
 { \sqrt{var_{0}(J)} }

where E0(J) and var0(J) are the expected value and variance of the test statistic under the null hypothesis.

E_{0}(J)  =  ( n^2 -
 \sum_{i}n_{i \cdot}^2 ) / 4

var0(J) = A / 72 + B / [ 36n(n-1)(n-2) ] + C / [ 8n(n-1) ]

where

A = n(n-1)(2n+5) - \sum_{i}n_{i \cdot}(n_{i \cdot}-1)(2n_{i \cdot}+5)
 - \sum_{j}n_{\cdot j}(n_{\cdot j}-1)(2n_{\cdot j}+5)

B = [\sum_{\phantom{j}i\phantom{j}}n_{i \cdot}(n_{i \cdot}-1)(n_{i \cdot}-2) ]
 [\sum_{j}n_{\cdot j}(n_{\cdot j}-1)(n_{\cdot j}-2) ]

C = [\sum_{\phantom{j}i\phantom{j}}n_{i \cdot}(n_{i \cdot}-1) ]
 [\sum_{j}n_{\cdot j}(n_{\cdot j}-1) ]

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


 P_{1} = {\rm Prob}
 ({\rm Std  JT  Statistic} \gt J^* )
 
 {\rm if} J^* \gt 0

P_{1} = {\rm Prob}
 ({\rm Std  JT  Statistic} \lt J^*  )
 
 {\rm if} J^* \leq 0

The two-sided p-value P2 is computed as

P_{2} = {\rm Prob}
 ({\rm | Std  JT  Statistic|}
 \gt | J^*| )

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.