[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]

[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]