Example 28.7: Computing the CochranArmitage Trend Test
The data set Pain contains hypothetical data for a
clinical trial of a drug therapy to control pain. The
clinical trial investigates whether adverse responses
increase with larger drug doses. Subjects receive either a
placebo or one of four drug doses. An adverse response is
recorded as Adverse='Yes'; otherwise, it is recorded as
Adverse='No'. The number of subjects for each drug
dose and response combination is contained in the variable
Count.
data Pain;
input Dose Adverse $ Count @@;
datalines;
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
;
The TABLES statement in the following program produces a
twoway table. The MEASURES option produces measures of
association, and the CL option produces confidence limits
for these measures. The TREND option tests for a trend
across the ordinal values of the Dose variable
with the CochranArmitage test.
The EXACT statement produces exact pvalues for this test,
and the MAXTIME= option terminates the exact
computations if they do not complete within 60 seconds.
The TEST statement computes
an asymptotic test for Somer's D(CR).
These statements produce Output 28.7.1 through Output 28.7.3.
proc freq data=Pain;
weight Count;
tables Dose*Adverse / trend measures cl;
test smdcr;
exact trend / maxtime=60;
title1 'Clinical Trial for Treatment of Pain';
run;
Output 28.7.1: Contingency Table
Clinical Trial for Treatment of Pain 
Frequency Percent Row Pct Col Pct 

Table of Dose by Adverse 
Dose 
Adverse 
Total 
No 
Yes 
0 
26 16.15 81.25 25.49 
6 3.73 18.75 10.17 
32 19.88 
1 
26 16.15 78.79 25.49 
7 4.35 21.21 11.86 
33 20.50 
2 
23 14.29 71.88 22.55 
9 5.59 28.13 15.25 
32 19.88 
3 
18 11.18 56.25 17.65 
14 8.70 43.75 23.73 
32 19.88 
4 
9 5.59 28.13 8.82 
23 14.29 71.88 38.98 
32 19.88 
Total 
102 63.35 
59 36.65 
161 100.00 


The "Row Pct" values in Output 28.7.1 show the expected
increasing trend in the proportion of adverse effects due to
increasing dosage (from 18.75% to 71.88%).
Output 28.7.2: Measures of Association
Clinical Trial for Treatment of Pain 
Statistics for Table of Dose by Adverse 
Statistic 
Value 
ASE 
95% Confidence Limits 
Gamma 
0.5313 
0.0935 
0.3480 
0.7146 
Kendall's Taub 
0.3373 
0.0642 
0.2114 
0.4631 
Stuart's Tauc 
0.4111 
0.0798 
0.2547 
0.5675 
Somers' D CR 
0.2569 
0.0499 
0.1592 
0.3547 
Somers' D RC 
0.4427 
0.0837 
0.2786 
0.6068 
Pearson Correlation 
0.3776 
0.0714 
0.2378 
0.5175 
Spearman Correlation 
0.3771 
0.0718 
0.2363 
0.5178 
Lambda Asymmetric CR 
0.2373 
0.0837 
0.0732 
0.4014 
Lambda Asymmetric RC 
0.1250 
0.0662 
0.0000 
0.2547 
Lambda Symmetric 
0.1604 
0.0621 
0.0388 
0.2821 
Uncertainty Coefficient CR 
0.1261 
0.0467 
0.0346 
0.2175 
Uncertainty Coefficient RC 
0.0515 
0.0191 
0.0140 
0.0890 
Uncertainty Coefficient Symmetric 
0.0731 
0.0271 
0.0199 
0.1262 
Somers' D CR 
Somers' D CR 
0.2569 
ASE 
0.0499 
95% Lower Conf Limit 
0.1592 
95% Upper Conf Limit 
0.3547 
Test of H0: Somers' D CR = 0 
ASE under H0 
0.0499 
Z 
5.1511 
Onesided Pr > Z 
<.0001 
Twosided Pr > Z 
<.0001 

Output 28.7.2 displays the measures of association produced
by the MEASURES option. Somer's D(CR) measures the
association treating the column variable (Adverse) as
the response and the row variable (Dose) as a
predictor. Because the asymptotic 95% confidence limits
do not contain zero, this indicates a strong positive association.
Similarly, the Pearson and Spearman correlation coefficients
show evidence of a strong positive association, as
hypothesized.
Output 28.7.3: Tests
Clinical Trial for Treatment of Pain 
Statistics for Table of Dose by Adverse 
CochranArmitage Trend Test 
Statistic (Z) 
4.7918 


Asymptotic Test 

Onesided Pr < Z 
<.0001 
Twosided Pr > Z 
<.0001 


Exact Test 

Onesided Pr <= Z 
7.237E07 
Twosided Pr >= Z 
1.324E06 

The CochranArmitage test (Output 28.7.3) supports the trend
hypothesis. The
small leftsided pvalues for the CochranArmitage test
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 twosided pvalue tests against either an increasing or
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.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.