Anda di halaman 1dari 11

Chapter 3: Three-Way Contingency Tables 1

Chapter 3: Three-Way Contingency Tables


Example. Florida court cases with multiple murders,
197687 (Radelet & Pierce, Florida Law Review, 1991,
pp. 134).
Victims Defendants Death Penalty Percentage
Race Race Yes No Yes
White White 53 414 11.3
Black 11 37 22.9
Black White 0 16 0.0
Black 4 139 2.8
Total White 53 430 11.0
Black 15 176 7.9
We treat


death penalty as a response variable


 

defendants race as an explanatory variable


 

victims race as a control variable.


Chapter 3: Three-Way Contingency Tables 2

53 414 0 16
and are called partial tables.
11 37 4 139


is controlled (held constant) in the partial table. Odds


ratios in the partial tables are called conditional odds ratios:
  
    
 
   
   

For white victims ,


   
  
   
 ! 
   

For black victims ,


 
Controlling for victims race, the odds of receiving the death
penalty were lower for white defendants than black
defendants.

Combining the partial tables yields the - marginal table,


53 430
, which has
15 176

   "   " 
  #
 

  

Ignoring victims race, odds of death penalty were higher for


white defendants than black defendants.
Chapter 3: Three-Way Contingency Tables 3

Simpsons paradox occurs when all partial tables show


reverse association from that in the marginal table.
Cause? Note that
For each defendants race, death penalty much more
likely when victim is white.
Very strong assoc. between defendants and victims race
(whites kill whites, blacks kill blacks).
Moral: It can be very dangerous to collapse contingency
tables.
Chapter 3: Three-Way Contingency Tables 4

  
Def. In a  


table, there is homogeneous


association if
 
 
 
    
  
  

Example.
  

smoker (yes,no), lung cancer (yes,no).


 
 

Homogen. Nonhomogen.
 

age Assoc. Assoc. Indep.


 "  "
1.  45  
  "
2. 4565   
  "
3. 65   

  
 
Note. When conditional odds ratios are equal, then
 

    
 
so are the conditional and odds ratios.
Chapter 3: Three-Way Contingency Tables 5

Testing Conditional Independence


 
In a   table, want to test
   
 
  
   "
H

Let  be the sample count in row and column


of partial

 
   
   
table :       .
 
     

In partial table , we reduce data to a single count   by
conditioning on row and column marginal totals. Then, under
H ,

   
 
   
 

   
        
     


   
We expect
    
 
     


when
  
 
 when 
  
 
  when  
Chapter 3: Three-Way Contingency Tables 6

Summarize differences across strata using


Cochran-Mantel-Haenszel statistic 
   
   
 


CMH
 

Under H , CMH is approximately chi-squared with d.f. for
large samples. P-value is right-tail prob.
  

CMH test most appropriate when  has same direction
in each partial table.
Example. Death penalty data.
H : death penalty and def. race cond. indep., given victims
race.
  
  
 
  "
Recall    and 
  (   if add
  

to
each cell). So both odds ratios have assoc. in the same
direction (both less than 1).

    !
 
  

CMH df P-value

Fairly strong evidence of an association.


How strong is the association?
Chapter 3: Three-Way Contingency Tables 7

When the association seems similar in each partial table, we


summarize it by the Mantel-Haenszel estimator
    




  


 
 


     
MH

Example.
 


    
    
    
 

MH   
 

Controlling for victims race, estimated odds of death penalty


for white defendants is 41% of estimated odds of death
penalty for black defendants.
     
From SAS, a 95% CI for MH is   . We can
 
conclude that MH  .
   
Note asymmetry of CI around  MH 


.
Chapter 3: Three-Way Contingency Tables 8

Note. Under the assumption that


  
 

  
 


(homogeneous association),

 MH estimates the common odds ratio.

SAS also provides the Breslow-Day statistic for testing


  
    
 
hypothesis H 
 

of
homogeneity of odds ratios. Its large sample dist. is
 
chi-squared with d.f.
  
 
  

Example. . Breslow-Day stat. , df ,


   
   
 
 . It is plausible that
 

P-value .
CMH test extends to   tables. (See Section 7.3


and SAS PROC FREQ), and there are analogous tests


using models.
For small samples, there is an exact test of conditional
independence (need special SAS PROC STATXACT)
(Section 7.3).
Chapter 3: Three-Way Contingency Tables 9

CMH Analysis in SAS


data cmh;
input victim $ defend $ penalty $ count @@;
cards;
w w yes 53 w w no 414
w b yes 11 w b no 37
b w yes 0 b w no 16
b b yes 4 b b no 139
;
proc freq order=data;
weight count;
tables victim*defend*penalty / cmh;
run;

TABLE 1 OF DEFEND BY PENALTY


CONTROLLING FOR VICTIM=w

DEFEND PENALTY

Frequency|
Percent |
Row Pct |
Col Pct |yes |no | Total
---------+--------+--------+
w | 53 | 414 | 467
| 10.29 | 80.39 | 90.68
| 11.35 | 88.65 |
| 82.81 | 91.80 |
---------+--------+--------+
b | 11 | 37 | 48
| 2.14 | 7.18 | 9.32
| 22.92 | 77.08 |
| 17.19 | 8.20 |
---------+--------+--------+
Total 64 451 515
12.43 87.57 100.00
Chapter 3: Three-Way Contingency Tables 10

TABLE 2 OF DEFEND BY PENALTY


CONTROLLING FOR VICTIM=b

DEFEND PENALTY

Frequency|
Percent |
Row Pct |
Col Pct |yes |no | Total
---------+--------+--------+
w | 0 | 16 | 16
| 0.00 | 10.06 | 10.06
| 0.00 | 100.00 |
| 0.00 | 10.32 |
---------+--------+--------+
b | 4 | 139 | 143
| 2.52 | 87.42 | 89.94
| 2.80 | 97.20 |
| 100.00 | 89.68 |
---------+--------+--------+
Total 4 155 159
2.52 97.48 100.00
Chapter 3: Three-Way Contingency Tables 11

SUMMARY STATISTICS FOR DEFEND BY PENALTY


CONTROLLING FOR VICTIM

Cochran-Mantel-Haenszel Statistics (Based on Table Scores)

Statistic Alternative Hypothesis DF Value Prob


------------------------------------------------------
3 General Association 1 5.796 0.016

Estimates of the Common Relative Risk (Row1/Row2)


95%
Type of Study Method Value Confidence Bounds
----------------------------------------------------------
Case-Control Mantel-Haenszel 0.412 0.200 0.848
(Odds Ratio)

Breslow-Day Test for Homogeneity of the Odds Ratios

Chi-Square = 0.204 DF = 1 Prob = 0.652