Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The FREQ Procedure

Cochran-Armitage Test for Trend

The TREND option in the TABLES statement requests the Cochran-Armitage test for trend, which tests for trend in binomial proportions across levels of a single factor or covariate. This test is appropriate for a contingency table where one variable has two levels and the other variable is ordinal. The two-level variable represents the response, and the other variable represents an explanatory variable with ordered levels. When the contingency table has two columns and R rows, PROC FREQ tests for trend across the R levels of the row variable, and the binomial proportion is computed as the proportion of observations in the first column. When the table has two rows and C columns, PROC FREQ tests for trend across the C levels of the column variable, and the binomial proportion is computed as the proportion of observations in the first row.

The trend test is based upon the regression coefficient for the weighted linear regression of the binomial proportions on the scores of the levels of the explanatory variable. Refer to Margolin (1988) and Agresti (1990). If the contingency table has two columns and R rows, the trend test statistic is computed as

T = \frac {\sum_{i=1}^R
 n_{i1} (R_{i} - \bar{R})} {\sqrt{ p_{\cdot 1} ( 1 - p_{\cdot 1} ) s^2 }}

where

s^2 = \sum_{i=1}^R n_{i \cdot}
 (R_{i} - \bar{R})^2

The row scores Ri are determined by the value of the SCORES= option in the TABLES statement. By default, PROC FREQ uses table scores. For character variables, the table scores for the row variable are the row numbers (for example, 1 for the first row, 2 for the second row, and so on). For numeric variables, the table score for each row is the numeric value of the row level. When you perform the trend test, the explanatory variable may be numeric (for example, dose of a test substance), and these variable values may be appropriate scores. If the explanatory variable has ordinal levels that are not numeric, you can assign meaningful scores to the variable levels. Sometimes equidistant scores, such as the table scores for a character variable, may be appropriate. For more information on choosing scores for the trend test, refer to Margolin (1988).

The null hypothesis for the Cochran-Armitage test is no trend, which means that the binomial proportion pi1 = ni1 / ni · is the same for all levels of the explanatory variable. Under this null hypothesis, the trend test statistic is asymptotically distributed as a standard normal random variable. In addition to this asymptotic test, PROC FREQ can compute the exact trend test, which you request by specifying the TREND 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 trend test. When the 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 trend in binomial proportions from row 1 to row R. When the test statistic is less than or equal to zero, PROC FREQ outputs the left-sided p-value. A small left-sided p-value supports the alternative of decreasing trend.

The one-sided p-value P1 can be expressed as


 P_{1} = {\rm Prob}
 ({\rm TrendStatistic} \gt T) 
 {\rm if} T \gt 0

P_{1} = {\rm Prob}
 ({\rm TrendStatistic} \lt T) 
 {\rm if} T \leq 0

The two-sided p-value P2 is computed as

P_{2} = {\rm Prob}
 ({\rm | Trend Statistic|} \gt | T| )

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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