Chapter Contents

Previous

Next
The FREQ Procedure

Example 7: Computing the Cochran-Armitage Trend Test


Procedure features:
EXACT statement options:
statistic-keywords
MAXTIME=
TABLES statement options:
CL
MEASURES
TREND
TEST statement
WEIGHT statement

This example

The Cochran-Armitage test checks for trend in binomial proportions across levels of a single factor. Use this test for a contingency table with a two-level response variable and an explanatory variable with any number of ordered levels. The binomial proportion is defined as the proportion in the first level of the response variable. PROC FREQ uses explanatory variable scores to compute the Cochran-Armitage test, which you can set to meaningful values that reflect the degree of difference among the levels.


Program
 Note about code
options nodate pageno=1 linesize=80 pagesize=72;

data pain;
   input Dose Adverse $ Count @@;
   cards;
0 No 26 0 Yes  6
1 No 26 1 Yes  7
2 No 23 2 Yes  9
3 No 18 3 Yes 14
4 No  9 4 Yes 23
;
 Note about code
proc freq data=pain;
   weight count;
 Note about code
   tables dose*adverse /trend measures cl;
 Note about code
   test smdcr;
 Note about code
   exact trend /maxtime=60;
 Note about code
   title1 'Clinical Trial for Treatment of Pain';
run;


Output
The Row Pct values show the expected increasing trend in the proportion of adverse effects (from 18.75% to 71.88%).

Somers' D (C|R ) measures the association. The column variable (Adverse) is the response and the row variable (Dose) is a predictor. Because the asymptotic 95% confidence limit does not contain zero, this indicates a strong positive association. Similarly, Pearson and Spearman correlation coefficients show evidence of a strong positive association as hypothesized.

The Cochran-Armitage test supports the trend hypothesis. The small left-sided p-values indicate that the probability of the Column 1 level (Adverse=No) decreases as Dose increases, or equivalently, that the probability of the Column 2 level (Adverse=Yes) increases as Dose increases. The two-sided p-value tests against either the increasing or the decreasing alternative. This is an appropriate hypothesis when you want to determine whether the drug has progressive effects on the probability of adverse effects, but the direction is unknown.

[HTML Output]
 [Listing Output]


Chapter Contents

Previous

Next

Top of Page

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