Chapter Contents |
Previous |
Next |

The FREQ Procedure |

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

where

The row scores *R*_{i} 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 *p*_{i1} = *n*_{i1} / *n*_{i ·} 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 *P _{1}* can be expressed as

The two-sided *p*-value *P _{2}* is computed as

Chapter Contents |
Previous |
Next |
Top |

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