12-11-2014 06:49 AM
I am currently having some problems with a minor issue. If anyone could please help me I would be very grateful. I hope I have explained my self in an understandable way, otherwise please let me know.
I have calculated Odds ratios using the proc freq procedure for chisq measures. These however are the crude numbers and I need to adjust for age. And I am not sure which statistical measure will be the best suited to do so.
I am doing a cross sectional study using register based materials. I am comparing to groups and these groups differ significantly age wise.
I have found the following code in SAS examples, were they use Cochran-Mantel-Haenszel statistics to adjust for gender:
(copy/paste from Base SAS(R) 9.2 Procedures Guide: Statistical Procedures, Third Edition )
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
The following PROC FREQ statements create a multiway table stratified by Gender, where Treatment forms the rows and Response forms the columns. The CMH option produces the Cochran-Mantel-Haenszel statistics. For this stratified table, estimates of the common relative risk and the Breslow-Day test for homogeneity of the odds ratios are also displayed. The NOPRINT option suppresses the display of the contingency tables. These statements produce Output 3.7.1 through Output 3.7.3.
proc freq data=Migraine;
tables Gender*Treatment*Response / cmh;
title 'Clinical Trial for Treatment of Migraine Headaches';
My question is how to adjust for age and not gender using the Cochran-Mantel-Haenszel statistics. Do I need to split up the data into age groups 25-35 years, 35-45 years, 45-55 years and so on? My data set is currently not divided into groups but range for 16 years to 100 years +
12-11-2014 02:45 PM
Your approach is correct. After creating the age groups, use PROC FREQ in a manner similar to the given example, replacing Gender with whatever variable name you use to create the age groups.
You may wish to examine if your age data divides itself naturally, rather than forcing 10 year strata.
12-16-2014 10:03 AM
Thank you very much Steve - that was very help full. I have had success implementing the code
I just have a quick question to the results. I get the following output:
Summary Statistics for druk by AMI
Controlling for aldvintr
Cochran-Mantel-Haenszel Statistics (Based on Table Scores)
Statistic Alternative Hypothesis DF Value Prob
1 Nonzero Correlation 1 14.2628 0.0002
2 Row Mean Scores Differ 1 14.2628 0.0002
3 General Association 1 14.2628 0.0002
Estimates of the Common Relative Risk (Row1/Row2)
Type of Study Method Value 95% Confidence Limits
Case-Control Mantel-Haenszel 0.5349 0.3856 0.7419
(Odds Ratio) Logit ** 0.7646 0.5653 1.0340
Cohort Mantel-Haenszel 0.9331 0.9063 0.9608
(Col1 Risk) Logit 0.9176 0.9030 0.9324
Cohort Mantel-Haenszel 1.7213 1.2843 2.3070
(Col2 Risk) Logit ** 1.1898 0.9218 1.5358
** These logit estimators use a correction of 0.5 in every cell
of those tables that contain a zero. Tables with a zero
row or a zero column are not included in computing the
Breslow-Day Test for
Homogeneity of the Odds Ratios
Pr > ChiSq 0.9516
Total Sample Size = 4509
My question is to the interpretation of the above. Are the yellow high-lighted numbers the result I am looking for? So that the adjusted OR in the above given example equals OR: 0.5349; 95%CI: 0.3856; 0.7419, p value =0.002