10-27-2014 04:09 PM
I'm trying to generate summary odds ratios using the Cochran-Mantel-Haenszel test. All of the help documents say to specify a 'tables' statement and a statement to 'weight' by variable = Count. However, I have an analytical dataset and would like to summarize across one variable (VarA); I do not have a count variable. I've tried the code without the weight statement but haven't been successful. Does anyone have any suggestions? Thank you.
10-27-2014 04:26 PM
My data set structure is similar to this:
input ID $ Gender $ Treatment $ Response;
I would like to find the Mantel-Haenszel odds ratio for the association between treatment and response, summarized across gender. Instead of a count variable, I have one line per observation (ID number). According to this page, the result should be under the output table "Estimates of the Common Relative Risk". I'm interested in the result for the case-control study design. Thanks.
10-27-2014 05:03 PM
Can you show your full code. The example data gives results, but I'm not sure about the validity as they're all 1.
input Gender $ Treatment $ Response $ Count @@;
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
do i=1 to count;
proc sort data=migraine_expand; by gender;
ods graphics on;
proc freq data=Migraine;
tables gender*Treatment*Response /
relrisk plots(only)=relriskplot(stats) cmh noprint;
title 'Clinical Trial for Treatment of Migraine Headaches';
ods graphics off;