[Data] The Scottish health Heart Study: CHD (Yes/No), Residence (Rented/Owner), Smoker (Yes/No).
[Analysis] Study the effect of residence on CHD risk, controlling for smoking status.
[Specification]
In the tables Smoker*Residence*CHD
statement, the confounding variable(s) is positioned first. Conversely, the measures and test of association will focus on the association between the last two variables.
It is a good idea to request the stratum-specific risk estimates via the relrisk
option in order to check that the desired relative risks are being computed.
We can also include chisq
option so that SAS will conduct the independence test for each stratum.
cmh
will produce the Mantel-Haenzel odds ratios and relative risks and carry out the Breslow-Day test of homogeneity.
[Code and Output]
data shhs;
input CHD $ Residence $ Smoker $ N;
cards;
Yes Rented Yes 52
Yes Rented No 33
No Rented Yes 898
No Rented No 923
Yes Owner Yes 29
Yes Owner No 48
No Owner Yes 678
No Owner No 1722
;
proc freq order=data data=shhs;
weight N;
tables Smoker*Residence*CHD / chisq relrisk cmh;
run;
The FREQ Procedure
Table 1 of Residence by CHD
Controlling for Smoker=Yes
Residence CHD
Frequency|
Percent |
Row Pct |
Col Pct | Yes | No | Total
---------+--------+--------+
Rented | 52 | 898 | 950
| 3.14 | 54.19 | 57.33
| 5.47 | 94.53 |
| 64.20 | 56.98 |
---------+--------+--------+
Owner | 29 | 678 | 707
| 1.75 | 40.92 | 42.67
| 4.10 | 95.90 |
| 35.80 | 43.02 |
---------+--------+--------+
Total 81 1576 1657
4.89 95.11 100.00
Statistics for Table 1 of Residence by CHD
Controlling for Smoker=Yes
Statistic DF Value Prob
------------------------------------------------------
Chi-Square 1 1.6407 0.2002
Likelihood Ratio Chi-Square 1 1.6678 0.1965
Continuity Adj. Chi-Square 1 1.3589 0.2437
Mantel-Haenszel Chi-Square 1 1.6397 0.2004
Phi Coefficient 0.0315
Contingency Coefficient 0.0315
Cramer's V 0.0315
Fisher's Exact Test
----------------------------------
Cell (1,1) Frequency (F) 52
Left-sided Pr <= F 0.9196
Right-sided Pr >= F 0.1214
Table Probability (P) 0.0410
Two-sided Pr <= P 0.2075
Odds Ratio and Relative Risks
Statistic Value 95% Confidence Limits
------------------------------------------------------------------
Odds Ratio 1.3538 0.8503 2.1554
Relative Risk (Column 1) 1.3344 0.8563 2.0797
Relative Risk (Column 2) 0.9857 0.9646 1.0072
Sample Size = 1657
Table 2 of Residence by CHD
Controlling for Smoker=No
Residence CHD
Frequency|
Percent |
Row Pct |
Col Pct | Yes | No | Total
---------+--------+--------+
Rented | 33 | 923 | 956
| 1.21 | 33.86 | 35.07
| 3.45 | 96.55 |
| 40.74 | 34.90 |
---------+--------+--------+
Owner | 48 | 1722 | 1770
| 1.76 | 63.17 | 64.93
| 2.71 | 97.29 |
| 59.26 | 65.10 |
---------+--------+--------+
Total 81 2645 2726
2.97 97.03 100.00
Statistics for Table 2 of Residence by CHD
Controlling for Smoker=No
Statistic DF Value Prob
------------------------------------------------------
Chi-Square 1 1.1790 0.2775
Likelihood Ratio Chi-Square 1 1.1542 0.2827
Continuity Adj. Chi-Square 1 0.9363 0.3332
Mantel-Haenszel Chi-Square 1 1.1786 0.2776
Phi Coefficient 0.0208
Contingency Coefficient 0.0208
Cramer's V 0.0208
Fisher's Exact Test
----------------------------------
Cell (1,1) Frequency (F) 33
Left-sided Pr <= F 0.8849
Right-sided Pr >= F 0.1664
Table Probability (P) 0.0513
Two-sided Pr <= P 0.2885
Odds Ratio and Relative Risks
Statistic Value 95% Confidence Limits
------------------------------------------------------------------
Odds Ratio 1.2826 0.8175 2.0123
Relative Risk (Column 1) 1.2729 0.8229 1.9689
Relative Risk (Column 2) 0.9924 0.9783 1.0067
Sample Size = 2726
The FREQ Procedure
Summary Statistics for Residence by CHD
Controlling for Smoker
Cochran-Mantel-Haenszel Statistics (Based on Table Scores)
Statistic Alternative Hypothesis DF Value Prob
---------------------------------------------------------------
1 Nonzero Correlation 1 2.8049 0.0940
2 Row Mean Scores Differ 1 2.8049 0.0940
3 General Association 1 2.8049 0.0940
Common Odds Ratio and Relative Risks
Statistic Method Value
---------------------------------------------------------
Odds Ratio Mantel-Haenszel 1.3176
Logit 1.3166
Relative Risk (Column 1) Mantel-Haenszel 1.3035
Logit 1.3028
Relative Risk (Column 2) Mantel-Haenszel 0.9898
Logit 0.9903
Common Odds Ratio and Relative Risks
Statistic Method 95% Confidence Limits
-----------------------------------------------------------------------
Odds Ratio Mantel-Haenszel 0.9538 1.8203
Logit 0.9527 1.8195
Relative Risk (Column 1) Mantel-Haenszel 0.9550 1.7792
Logit 0.9545 1.7781
Relative Risk (Column 2) Mantel-Haenszel 0.9778 1.0018
Logit 0.9786 1.0022
Breslow-Day Test for
Homogeneity of the Odds Ratios
------------------------------
Chi-Square 0.0268
DF 1
Pr > ChiSq 0.8701
Total Sample Size = 4383
[Result]
The alternative hypothesis for the General Association
statistic is that, for at least one stratum, there is some kind of association between \(X\) and \(Y\). This statistic is always interpretable because it does not require an ordinal scale for either \(X\) or \(Y\).
The Row Mean Scores Differ
is an ANOVA statistic. It can be used only when the column variable Y lies on an ordinal (or interval) scale so that the mean score of Y is meaningful. For the ANOVA statistic, the mean score is computed for each row of the table, and the alternative hypothesis is that, for at least one stratum, the mean scores of the \(I\) rows are unequal. In other words, the statistic is sensitive to location differences among the \(I\) distributions of \(Y\).
The logit-based summary estimator of the odds ratio is a weighted geometric average of the stratum specific odds ratios where each weight is the inverse of the variance of the stratum specific log-odds ratio: \[ \log(OR_{logit}) = \frac{1}{\sum_i w_i} \sum_i w_i\log(OR_i) \]
The Breslow-Day test does not provide evidence against homogeneity of the odds ratios (\(p = 0.8701\)). Consequently, it is decided that the Mantel-Haenszel pooled estimate is appropriate to report.
The Mantel-Haenszel estimate of the common odds ratio is \(1.3176\) with a 95% confidence interval of \((0.9538, 1.8203)\).
The Mantel-Haenszel test statistic indicates that the adjusted relative risk is not significantly different from one (\(p = 0.0940\)). Therefore, we fail to conclude a significant association between residence and CHD after controlling for smoking status.