The JT option in the TABLES statement provides the JonckheereTerpstra 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 (or ), with at least one of the inequalities being strict, where denotes the effect of class i. For such ordered alternatives, the JonckheereTerpstra test can be preferable to tests of more general class difference alternatives, such as the Kruskal–Wallis test (produced by the WILCOXON option in the NPAR1WAY procedure). See Pirie (1983) and Hollander and Wolfe (1999) for more information about the JonckheereTerpstra test.
The JonckheereTerpstra test is appropriate for a twoway 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 about how to order variable levels, see the ORDER= option.
The JonckheereTerpstra test statistic is computed by first forming MannWhitney counts , where , for pairs of rows in the contingency table,






where is response j in row i. The JonckheereTerpstra test statistic is computed as
This test rejects the null hypothesis of no difference among classes for large values of J. Asymptotic pvalues for the JonckheereTerpstra test are obtained by using the normal approximation for the distribution of the standardized test statistic. The standardized test statistic is computed as
where and are the expected value and variance of the test statistic under the null hypothesis,
where
PROC FREQ computes onesided and twosided pvalues for the JonckheereTerpstra test. When the standardized test statistic is greater than its null hypothesis expected value of zero, PROC FREQ displays the rightsided pvalue, which is the probability of a larger value of the statistic occurring under the null hypothesis. A small rightsided pvalue 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 displays the leftsided pvalue. A small leftsided pvalue supports the alternative of decreasing order from row 1 to row R.
The onesided pvalue for the JonckheereTerpstra test, , is computed as
where Z has a standard normal distribution. The twosided pvalue, , is computed as
PROC FREQ also provides exact pvalues for the JonckheereTerpstra test. You can request the exact test by specifying the JT option in the EXACT statement. See the section Exact Statistics for more information.