Example 28.6: Computing CochranMantelHaenszel Statistics for a Stratified Table
The data set Migraine contains hypothetical data for a
clinical trial of migraine treatment. Subjects of both
genders receive either a new drug therapy or a
placebo. Their response to treatment is coded as 'Better' or
'Same'. The data are recorded as cell counts, and the
number of subjects for each treatment and response
combination is recorded in the variable Count.
data Migraine;
input Gender $ Treatment $ Response $ Count @@;
datalines;
female Active Better 16 female Active Same 11
female Placebo Better 5 female Placebo Same 20
male Active Better 12 male Active Same 16
male Placebo Better 7 male Placebo Same 19
;
The following statements create a threeway table stratified
by Gender, where Treatment forms the rows and
Response forms the columns. The CMH option produces
the CochranMantelHaenszel statistics. For this stratified
2×2 table, estimates of the common relative risk and
the BreslowDay test for homogeneity of the odds ratios are
also displayed. The NOPRINT option suppresses the display
of the contingency tables. These statements produce
Output 28.6.1 through Output 28.6.3.
proc freq data=Migraine;
weight Count;
tables Gender*Treatment*Response / cmh noprint;
title1 'Clinical Trial for Treatment of Migraine Headaches';
run;
Output 28.6.1: CochranMantelHaenszel Statistics
Clinical Trial for Treatment of Migraine Headaches 
Summary Statistics for Treatment by Response Controlling for Gender 
CochranMantelHaenszel Statistics (Based on Table Scores) 
Statistic 
Alternative Hypothesis 
DF 
Value 
Prob 
1 
Nonzero Correlation 
1 
8.3052 
0.0040 
2 
Row Mean Scores Differ 
1 
8.3052 
0.0040 
3 
General Association 
1 
8.3052 
0.0040 

For a stratified 2×2 table, the three CMH statistics
displayed in Output 28.6.1 test the same hypothesis. The
significant pvalue (0.004) indicates that the association
between treatment and response remains strong after
adjusting for gender.
Output 28.6.2: CMH Option: Relative Risks
Clinical Trial for Treatment of Migraine Headaches 
Summary Statistics for Treatment by Response Controlling for Gender 
Estimates of the Common Relative Risk (Row1/Row2) 
Type of Study 
Method 
Value 
95% Confidence Limits 
CaseControl 
MantelHaenszel 
3.3132 
1.4456 
7.5934 
(Odds Ratio) 
Logit 
3.2941 
1.4182 
7.6515 
Cohort 
MantelHaenszel 
2.1636 
1.2336 
3.7948 
(Col1 Risk) 
Logit 
2.1059 
1.1951 
3.7108 
Cohort 
MantelHaenszel 
0.6420 
0.4705 
0.8761 
(Col2 Risk) 
Logit 
0.6613 
0.4852 
0.9013 

The CMH option also produces a table of relative risks, as
shown in Output 28.6.2. Because this is a prospective
study, the relative risk estimate assesses the effectiveness
of the new drug; the "Cohort (Col1 Risk)" values
are the appropriate estimates for the first column, or the
risk of improvement. The probability of migraine
improvement with the new drug is just over two times the
probability of improvement with the placebo.
Output 28.6.3: CMH Option: BreslowDay Test
Clinical Trial for Treatment of Migraine Headaches 
Summary Statistics for Treatment by Response Controlling for Gender 
BreslowDay Test for Homogeneity of the Odds Ratios 
ChiSquare 
1.4929 
DF 
1 
Pr > ChiSq 
0.2218 

The large pvalue for the BreslowDay test (0.2218) in
Output 28.6.3 indicates no significant gender difference in
the odds ratios.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.