Comparing Contingency Tables See section 19.5 of text. Although the following data is hypothetical, it based a real data set discussed by Bickel and O'Connell, "Is there a sex bias in graduate admissions?", Science 187 (1975), p. 398-404. Upper Wabash Tech has 2 professional schools: business and law. To investigate sex bias at this school, a 2-way table was constructed for admission decision and gender: Admission Decision Gender Admit Deny ------------------------- Male 490 210 Female 280 220 Find the odds ratio to compare the chance of a male being admitted to the chance of a female being admitted. What does it suggest? Now we will construct a 3-way table, categorized by gender, school and admission decision. Business: Admission Decision Gender Admit Deny ------------------------- Male 480 120 Female 180 20 Law: Admission Decision Gender Admit Deny ------------------------- Male 10 90 Female 100 200 For each school, find the odds ratio to compare the chance of a male being admitted to the chance of a female being admitted. What do we see? SIMPSON'S PARADOX: The reversal of the direction of a comparison or an association when data from several groups are combined to form a single group. One way to analyze 3-way tables is the MANTEL-HAENSZEL TEST. In this example, it would test if the odds of a male getting admission are greater than a female getting admission, GIVEN that the type of school is accounted for. Assumptions: 1. The odds ratio (odds male admitted/odds female admitted) is the same for all tables. If this doesn't hold, the test doesn't make sense. 2. Test assumes that there is no 3-way dependence of admission, gender and school. One way to save this data in R is to use a 3-dimensional array, which attaches several matrices together. # Enter the data COLUMNWISE in the "array" command, beginning with # your first matrix. # When the data is entered, we must tell R the size of our # array. Here it is 2x2x2, where the first number is the number of rows # in each matrix, followed by the number of columns, followed by # the number of matrices we have. > admit.status <- array(c(480,180,120,20,10,100,90,200),c(2,2,2)) > admit.status , , 1 [,1] [,2] [1,] 480 120 [2,] 180 20 , , 2 [,1] [,2] [1,] 10 90 [2,] 100 200 # In creating names for the rows, etc., we start with names for the # rows, then columns, then each matrix > dimnames(admit.status) <- list(c("Male", "Female"),c("Admit", "Deny"), c("Business", "Law")) > admit.status , , Business Admit Deny Male 480 120 Female 180 20 , , Law Admit Deny Male 10 90 Female 100 200 # Assuming that odds ratio of (male admitted)/(female admitted) is the # same for both schools. Not sure how reasonable this is. > mantelhaen.test(admit.status) Mantel-Haenszel chi-squared test with continuity correction data: admit.status Mantel-Haenszel X-squared = 27.9217, df = 1, p-value = 1.263e-07 alternative hypothesis: true common odds ratio is not equal to 1 95 percent confidence interval: 0.2288500 0.5153906 sample estimates: common odds ratio 0.3434343