Chapter Contents


The FREQ Procedure

Example 6: Computing Cochran-Mantel-Haenszel Statistics for a Stratified Table

Procedure features:
TABLES statement options:
WEIGHT statement

This example

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

data migraine;
   input Gender $ Treatment $ Improve $ Frequency @@;
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
 Note about code
proc freq data=migraine;
   weight frequency;
 Note about code
   tables gender*treatment*improve/cmh noprint;
 Note about code
   title1 'Clinical Trial for Treatment of Migraine Headaches';

PROC FREQ computes Cochran-Mantel-Haenszel statistics, controlling for Gender. For stratified 2×2 contingency tables, these statistics include estimates of the common relative risk and the Breslow-Day test for homogeneity of the odds ratios. For a stratified 2×2 table, the three CMH statistics test the same hypothesis. The significant p-value (.004) indicates that the association between treatment and response remains strong after adjusting for gender.

The large p-value for the Breslow-Day test (.222) indicates no significant gender difference in the odds ratios. Because this is a prospective study, the relative risk estimate assesses the effectiveness of the new drug. The probability of migraine improvement with the new drug is just over two times the probability of improvement with the placebo.

[HTML Output]
 [Listing Output]

Chapter Contents



Top of Page

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