VIEWS: 8 PAGES: 54 CATEGORY: Education POSTED ON: 5/13/2010
ThreeâWay Tables Edpsy/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA - CHAMPAIGN ThreeâWay Tables Slide 1 of 54 Outline s Types of association 1. Marginal & Partial tables. Overview q Outline 2. Marginal & Conditional odds ratios. q Examples of 3âWay Tables 3. Marginal & Conditional Independence/Dependence. Marginal and Partial Tables (a) Marginal Independence and Conditional Dependence. Conditional and Marginal Odds Ratios (b) Marginal Dependence and Conditional Independence. Statistical Inference & 3âWay (c) Marginal and Conditional Dependence. Tables Tests of Conditional 4. Homogeneous association. Independence s Inference for Large Samples. Estimating Common Odds Ratio Testing Homogeneity of Odds 1. Cochran-Mantel-Haenszal tests â Conditional Ratios independence. Concluding comments 2. Estimating common odds ratio. 3. Breslow-Day statistic â Testing homogeneity. 4. Comments. s Inference for Small Samples (a few comments). ThreeâWay Tables Slide 2 of 54 Examples of 3âWay Tables Overview q Outline s Smoking × Breathing × Age. q Examples of 3âWay Tables s Group × Response × Z (hypothetical). Marginal and Partial Tables Conditional and Marginal Odds s Boys Scouts × Delinquent × SES (hypothetical). Ratios s Cal graduate admissions × gender × Department. Statistical Inference & 3âWay Tables s Supervisor Job satisfaction × Worker Job satisfaction × Tests of Conditional Independence Management quality. Estimating Common Odds Ratio s Race × Questions regarding media × Year. Testing Homogeneity of Odds Ratios s Employment status × Residence × Months after hurricane Concluding comments Katrina. ThreeâWay Tables Slide 3 of 54 3âWay Contingency Table ¨ ¨ ¨ ¨¨ ¨¨¨ Overview ¨ ¨ Marginal and Partial Tables 1 q 3âWay Contingency Table . . q Partial Tables & Marginal Tables . Conditional and Marginal Odds X i nijk Ratios . . Statistical Inference & 3âWay . ¨¨ ¨k K ¨ Tables Tests of Conditional I ¨ Independence 1 ... j ... J 1 Z Estimating Common Odds Ratio Testing Homogeneity of Odds Y Ratios Slices of this table are âPartial Tablesâ. Concluding comments There are 3âways to slice this table up. 1. K Frontal planes or XY for each level of Z. 2. J Vertical planes or XZ for each level of Y . 3. I Horizontal planes or Y Z for each level of X. ThreeâWay Tables Slide 4 of 54 Partial Tables & Marginal Tables e.g., XY tables for each level of Z. . . The Frontal planes of the box are XY tables for each level of Z Overview are Partial tables: Marginal and Partial Tables Z=1 Z=2 . . .Z = K q 3âWay Contingency Table q Partial Tables & Marginal Y Y Y Tables 1 . . . j . . .J 1 . . .j . . .J 1 . . .j . . .J Conditional and Marginal Odds 1 . 1 . 1 . Ratios . . . ... . . Statistical Inference & 3âWay X i nij1 . X i nij2 X i nijK Tables . . . . . . Tests of Conditional . . . Independence I I I Estimating Common Odds Ratio Testing Homogeneity of Odds Ratios Sum across the K levels of Z Yields the following Marginal Table Concluding comments Y 1 . . . j . . .J 1 . . . K where nij+ = k=1 nijk X i. nij+ . . I ThreeâWay Tables Slide 5 of 54 Conditional or âPartialâ Odds Ratios Notation: nijk = observed frequency of the (i, j, k)th cell. Overview Marginal and Partial Tables µijk = expected frequency of the (i, j, k)th cell. Conditional and Marginal Odds = nĎijk Ratios q Conditional or âPartialâ Odds Ratios Conditional Odds Ratios are odds ratios between two q Marginal Odds Ratios q Example of Marginal vs variables for ďŹxed levels of the third variable. Partial Odds Ratios q Example: Partial Tables q Marginal and Conditional Associations For ďŹxed level of Z, the conditional XY association given kth q Four Situations q Marginal level of Z is Independence/Conditional µ11k µ22k nijk niâ˛ j â˛ k Dependence q Marginal Î¸XY (k) = & more generally Î¸iiâ˛ ,jj â˛ (k) = Dependence/Conditional µ12k µ21k niâ˛ jk nij â˛ k Independence q Conditional Independence q Example of Conditional Conditional odds ratios are computed using the partial tables, Independence: CAL q CAL Admissions Data by and are sometimes referred to as measures of âpartial Department q 3rd Example of Conditional associationâ. Independence q 3rd Example: Partial Tables q Simpsonâs Paradox If Î¸XY (k) = 1, then variables X and Y are âConditionally q (Hypothetical) Example of Simpsonâs Paradox associatedâ. q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 6 of 54 (continued) Marginal Odds Ratios are the odds ratios between two variables in the marginal table. For example, for the XY margin: Overview Marginal and Partial Tables K Conditional and Marginal Odds µij+ = µijk Ratios q Conditional or âPartialâ Odds k=1 Ratios q Marginal Odds Ratios q Example of Marginal vs and the âMarginal Odds Ratioâ is Partial Odds Ratios q Example: Partial Tables µ11+ µ22+ µij+ µiâ˛ j â˛ + q Marginal and Conditional Î¸XY = & more generally Î¸ iiâ˛ ,jj â˛ = Associations q Four Situations µ12+ µ21+ µiâ˛ j+ µij â˛ + q Marginal Independence/Conditional Dependence q Marginal Dependence/Conditional Ë With sample data, use nijk and Î¸. Independence q Conditional Independence q Example of Conditional Marginal association can be very different from Independence: CAL q CAL Admissions Data by Department conditional association. q 3rd Example of Conditional Independence q 3rd Example: Partial Tables The marginal odds ratios need not equal the partial q Simpsonâs Paradox q (Hypothetical) Example of (conditional) odds ratios. Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 7 of 54 (continued) Example of Marginal vs Partial Odds Ratios These data are from a study reported by Forthofer & Lehnen (1981) (Agresti, 1990). Measures on Caucasians who work in certain industrial plants in Houston were recorded. Overview Marginal and Partial Tables s Response/outcome variable: breathing test result (normal, Conditional and Marginal Odds Ratios not normal). q Conditional or âPartialâ Odds Ratios s Explanatory variable: smoking status (never, current). q Marginal Odds Ratios q Example of Marginal vs s Conditioning variable: age Partial Odds Ratios q Example: Partial Tables q Marginal and Conditional Associations Marginal Table (ignoring age): q Four Situations q Marginal Independence/Conditional Smoking Test Result Dependence q Marginal Dependence/Conditional Status Normal Not Normal Independence q Conditional Independence Never 741 38 779 q Example of Conditional Independence: CAL q CAL Admissions Data by Current 927 131 1058 Department q 3rd Example of Conditional 1668 169 1837 Independence q 3rd Example: Partial Tables q Simpsonâs Paradox Ë Marginal odds ratio: Î¸ = 2.756 q (Hypothetical) Example of Simpsonâs Paradox HO : Î¸ = 1 vs HA : Î¸ = 1 â G2 = 32.382, df = 1, & pâvalue< .001. q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 8 of 54 (continued) Example: Partial Tables Age < 40 Smoking Test Result Overview Status Normal Not Normal Ë Î¸ = 1.41 Marginal and Partial Tables Conditional and Marginal Odds Never 577 34 611 G2 = 2.48 Ratios q Conditional or âPartialâ Odds Current 682 57 739 p-value = .11 Ratios q Marginal Odds Ratios 1259 91 1350 q Example of Marginal vs Partial Odds Ratios q Example: Partial Tables q Marginal and Conditional Age 40â59 Associations q Four Situations q Marginal Smoking Test Result Independence/Conditional Dependence Status Normal Not Normal Ë Î¸ = 12.38 q Marginal Dependence/Conditional Never 164 4 168 G2 = 45.125 Independence q Conditional Independence q Example of Conditional Current 245 74 319 p-value < .001 Independence: CAL q CAL Admissions Data by 409 78 487 Department q 3rd Example of Conditional Independence Compare these odds ratios with the marginal odds ratio: q 3rd Example: Partial Tables q Simpsonâs Paradox q (Hypothetical) Example of Ë Î¸ = 2.756 Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 9 of 54 (continued) Marginal and Conditional Associations Overview s Independence = âNo Associationâ. Marginal and Partial Tables s Dependence =â Associationâ. Conditional and Marginal Odds Ratios q Conditional or âPartialâ Odds s Marginal Independence means that Î¸XY = 1 Ratios q Marginal Odds Ratios s Marginal Dependence means that Î¸XY = 1 q Example of Marginal vs Partial Odds Ratios q Example: Partial Tables s Conditional Independence means that Î¸XY (k) = 1 for all q Marginal and Conditional Associations k = 1, . . . , K. q Four Situations q Marginal s Conditional Dependence means that Î¸XY (k) = 1 for at least Independence/Conditional Dependence one k = 1, . . . , K. q Marginal Dependence/Conditional Independence s Marginal independence does not imply conditional q Conditional Independence independence. q Example of Conditional Independence: CAL q CAL Admissions Data by s Conditional independence does not imply marginal Department q 3rd Example of Conditional independence. Independence q 3rd Example: Partial Tables q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 10 of 54 (continued) Four Situations Situation Marginal Conditional Comment 1 Independence Independence Not interesting Overview Marginal and Partial Tables Conditional and Marginal Odds 2 Independence Dependence âConditional Dependen Ratios q Conditional or âPartialâ Odds Ratios q Marginal Odds Ratios q Example of Marginal vs 3 Dependence Independence âConditional Independe Partial Odds Ratios q Example: Partial Tables q Marginal and Conditional Associations 4 Dependence Dependence âConditional Dependen q Four Situations q Marginal Independence/Conditional Dependence Conditional dependence includes a number of different cases, q Marginal Dependence/Conditional which we have terms to refer to them: Independence s Simpsonâs paradox. q Conditional Independence q Example of Conditional Independence: CAL s Homogeneous association. q CAL Admissions Data by Department s 3âway association. q 3rd Example of Conditional Independence q 3rd Example: Partial Tables Weâll take a look at examples of situations 2, 3 and 4 and each q Simpsonâs Paradox q (Hypothetical) Example of of these cases of conditional dependence. Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 11 of 54 (continued) Marginal Independence/Conditional Dependen Marginal Table Partial Tables: Overview Response Z = 1 Response Marginal and Partial Tables Group yes no Î¸ = 1/ Group yes no A 5 15 20 log(Î¸) = â2.19 Conditional and Marginal Odds Ratios B 15 5 20 q Conditional or âPartialâ Odds A 30 30 60 20 20 40 Ratios q Marginal Odds Ratios q Example of Marginal vs B 30 30 60 Z = 2 Response Partial Odds Ratios q Example: Partial Tables 60 60 120 Group yes no Î¸ = 1 q Marginal and Conditional A 10 10 20 log(Î¸) = 0 Associations B 10 10 20 q Four Situations q Marginal 20 20 40 Independence/Conditional Î¸=1 Dependence q Marginal log(Î¸) = 0 Z = 3 Response Dependence/Conditional Group yes no Î¸ = 9 Independence A 15 5 20 log(Î¸) = 2.197 q Conditional Independence q Example of Conditional B 5 15 20 Independence: CAL 20 20 40 q CAL Admissions Data by Department q 3rd Example of Conditional Independence q 3rd Example: Partial Tables Association is in opposite directions in tables Z = 1 and Z = 3. q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 12 of 54 (continued) Marginal Dependence/Conditional Independen Overview or just âConditional Independenceâ Marginal and Partial Tables Conditional and Marginal Odds Ratios s This situation and concept is not unique to categorical data q Conditional or âPartialâ Odds Ratios analysis. q Marginal Odds Ratios q Example of Marginal vs Partial Odds Ratios s Conditional independence is very important and is the basis q Example: Partial Tables q Marginal and Conditional for many models and techniques including Associations q Four Situations x Latent variable models (e.g., factor analysis, latent class q Marginal Independence/Conditional analysis, item response theory, etc.). Dependence q Marginal Dependence/Conditional x Multivariate Graphical models, which provide ways to Independence q Conditional Independence decompose models and problems into sub-problems. q Example of Conditional Independence: CAL q CAL Admissions Data by Department q 3rd Example of Conditional s Back to categorical data. . . . Independence q 3rd Example: Partial Tables q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 13 of 54 (continued) Conditional Independence Hypothetical Example from Agresti, 1990: Marginal Table: Partial Tables â condition on Overview Delinquent socioeconomic status Marginal and Partial Tables Boy Scout Yes No SES = Low Conditional and Marginal Odds Delinquent Ratios q Conditional or âPartialâ Odds Yes 36 364 400 Boy Scout Yes No Ë Î¸ = 1.00 Ratios Yes 10 40 50 q Marginal Odds Ratios No 60 340 400 No 40 160 200 q Example of Marginal vs Partial Odds Ratios 50 200 250 q Example: Partial Tables 96 704 800 q Marginal and Conditional Ë SES = Medium Associations q Four Situations Î¸ = .56 Delinquent G2 = 6.882 q Marginal Ë Boy Scout Yes No Î¸ = 1.00 Independence/Conditional Dependence Yes 18 132 150 q Marginal Dependence/Conditional pâvalue = .01 No 18 132 150 Independence 36 264 300 q Conditional Independence q Example of Conditional Independence: CAL SES = High q CAL Admissions Data by Delinquent Department Boy Scout Yes No Ë Î¸ = 1.00 q 3rd Example of Conditional Independence Yes 8 192 200 q 3rd Example: Partial Tables No 2 48 50 q Simpsonâs Paradox q (Hypothetical) Example of 10 240 250 Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 14 of 54 (continued) Example of Conditional Independence: CAL s University of California, Berkeley Graduate Admissions (1973). Data from Freedman, Pisani, & Purves (1978). Overview Marginal and Partial Tables s Question: Is there sex discrimination in admission to Conditional and Marginal Odds Ratios graduate school? q Conditional or âPartialâ Odds Ratios q Marginal Odds Ratios q Example of Marginal vs s The data for two departments (B & C) of the 6 largest are Partial Odds Ratios q Example: Partial Tables q Marginal and Conditional Admitted Associations q Four Situations Gender Yes No Ë Î¸ = .48 q Marginal Independence/Conditional Dependence Female 219 399 618 Ë 1/Î¸ = 2.09 q Marginal Dependence/Conditional Independence Male 473 412 885 95% CI: (.39, .59) q Conditional Independence q Example of Conditional 692 811 1503 Independence: CAL q CAL Admissions Data by Department odds(female admitted) = 219/399 = .55 q 3rd Example of Conditional Independence odds(male admitted) = 473/412 = 1.15 q 3rd Example: Partial Tables q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 15 of 54 (continued) CAL Admissions Data by Department Department B: Overview Admitted Marginal and Partial Tables Gender Yes No Ë Î¸ = 1.25 Conditional and Marginal Odds Ratios q Conditional or âPartialâ Odds Female 17 8 25 95% CI: (.53, 2.94) Ratios q Marginal Odds Ratios q Example of Marginal vs Male 353 207 560 Partial Odds Ratios q Example: Partial Tables 370 215 585 q Marginal and Conditional Associations q Four Situations q Marginal Department C: Independence/Conditional Dependence q Marginal Dependence/Conditional Admitted Independence q Conditional Independence Gender Yes No Ë Î¸ = .88 q Example of Conditional Independence: CAL Female 202 391 593 95% CI: (.67, 1.17) q CAL Admissions Data by Department q 3rd Example of Conditional Male 120 205 325 Independence q 3rd Example: Partial Tables 322 215 918 q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 16 of 54 (continued) 3rd Example of Conditional Independence . . . Maybe conditional independence. . . Job satisfaction (Andersen, 1985). These data are from a large scale Overview investigation of blue collar workers in Denmark (1968). Marginal and Partial Tables Three variables: Conditional and Marginal Odds Ratios s Worker job satisfaction (Low, High). q Conditional or âPartialâ Odds Ratios s Supervisor job satisfaction (Low, High). q Marginal Odds Ratios q Example of Marginal vs Partial Odds Ratios s Quality of Management (Bad, Good). q Example: Partial Tables q Marginal and Conditional Associations The Worker × Supervisor Job Satisfaction (Marginal Table): q Four Situations q Marginal Independence/Conditional Dependence Worker Ë Î¸ = 1.86, 95% CI (1.37, 2.52) q Marginal Dependence/Conditional Independence Supervisor satisfaction q Conditional Independence q Example of Conditional satisfaction Low High Statistics df Value Prob Independence: CAL q CAL Admissions Data by Department Low 162 196 358 X2 1 17.00 < .001 q 3rd Example of Conditional Independence q 3rd Example: Partial Tables High 110 247 357 G2 1 17.19 < .001 q Simpsonâs Paradox q (Hypothetical) Example of 272 443 715 Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 17 of 54 (continued) 3rd Example: Partial Tables Job satisfaction conditional on management quality Bad Management Good Management Overview Workerâs Workerâs Marginal and Partial Tables Conditional and Marginal Odds satisfaction satisfaction Ratios q Conditional or âPartialâ Odds Low High Low High Ratios q Marginal Odds Ratios q Example of Marginal vs Supervisorâs Low 103 87 190 Low 59 109 168 Partial Odds Ratios q Example: Partial Tables satisfaction High 32 42 74 High 78 205 283 q Marginal and Conditional Associations q Four Situations 135 129 264 137 314 451 q Marginal Independence/Conditional Dependence Ë Î¸bad = 1.55 and 95% CI for Î¸bad is (.90, 1.67) q Marginal Dependence/Conditional Ë Î¸good = 1.42 and 95% CI for Î¸good is (.94, 2.14) Independence q Conditional Independence q Example of Conditional Independence: CAL Bad Management Good Management q CAL Admissions Data by Department q 3rd Example of Conditional Statistic df Value pâvalue Value pâvalue Independence q 3rd Example: Partial Tables X2 1 2.56 .11 2.85 .09 q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox G2 1 2.57 .11 2.82 .09 q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association Weâll come back to this example. . . . ThreeâWay Tables Slide 18 of 54 (continued) Simpsonâs Paradox The marginal association is in the opposite direction as the conditional (or partial) association. Overview Consider 3 dichotomous variables: X, Y , and Z where Marginal and Partial Tables s P (Y = 1|X = 1) = conditional probability Y = 1 given X = 1, Conditional and Marginal Odds Ratios q Conditional or âPartialâ Odds s P (Y = 1|X = 1, Z = 1) = conditional probability Y = 1 given Ratios q Marginal Odds Ratios q Example of Marginal vs X = 1 and Z = 1. Partial Odds Ratios q Example: Partial Tables s Simpsonâs Paradox: q Marginal and Conditional Associations q Four Situations q Marginal Marginal: P (Y = 1|X = 1) < P (Y = 1|X = 2) Independence/Conditional Dependence q Marginal Conditionals: P (Y = 1|X = 1, Z = 1) > P (Y = 1|X = 2, Z = 1) Dependence/Conditional Independence P (Y = 1|X = 1, Z = 2) > P (Y = 1|X = 2, Z = 2) q Conditional Independence q Example of Conditional Independence: CAL q CAL Admissions Data by s In terms of odds ratios, it is possible to observed the Department q 3rd Example of Conditional following pattern of marginal and partial associations: Independence q 3rd Example: Partial Tables q Simpsonâs Paradox Marginal odds: Î¸XY < 1; however, Partial odds: Î¸XY (1) > 1 and Î¸XY (2) > 1 q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 19 of 54 (continued) (Hypothetical) Example of Simpsonâs Paradox Z=1 Z=2 Y =1 Y =2 Y =1 Y =2 Overview X=1 50 900 950 X=1 500 5 505 Marginal and Partial Tables X=2 1 100 101 X=2 500 95 595 Conditional and Marginal Odds Ratios 51 1000 1051 1000 100 1100 q Conditional or âPartialâ Odds Ratios q Marginal Odds Ratios q Example of Marginal vs Partial Odds Ratios Î¸XY (z=1) = 5.56 and Î¸XY (z=2) = 19.0 q Example: Partial Tables q Marginal and Conditional Ď1(x=1,z=1) = 50/950 = .05 and Ď1(x=1,z=2) = 500/505 = .99 Associations q Four Situations q Marginal Ď2(x=2,z=1) = 1/101 = .01 and Ď2(x=2,z=2) = 500/595 = .84 Independence/Conditional Dependence q Marginal The XY margin: Dependence/Conditional Independence q Conditional Independence Y =1 Y =2 Î¸XY = .237 q Example of Conditional Independence: CAL X=1 550 905 1455 Ď1 = 550/1455 = .38 q CAL Admissions Data by Department X=2 501 195 696 Ď2 = 501/696 = .72 q 3rd Example of Conditional Independence q 3rd Example: Partial Tables 1051 1100 2151 q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 20 of 54 (continued) Picture of Simpsonâs Paradox Overview Marginal and Partial Tables Conditional and Marginal Odds Ratios q Conditional or âPartialâ Odds Ratios q Marginal Odds Ratios q Example of Marginal vs Partial Odds Ratios q Example: Partial Tables q Marginal and Conditional Associations q Four Situations q Marginal Independence/Conditional Dependence q Marginal Dependence/Conditional Independence q Conditional Independence q Example of Conditional Independence: CAL q CAL Admissions Data by Department q 3rd Example of Conditional Independence q 3rd Example: Partial Tables q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 21 of 54 (continued) Homogeneous Association DeďŹnition: The association between variables X, Y , and Z is âhomogeneousâ if the following three conditions hold: Overview Marginal and Partial Tables Î¸XY (1) = . . . = Î¸XY (k) = . . . = Î¸XY (K) Conditional and Marginal Odds Ratios Î¸XZ(1) = . . . = Î¸XZ(j) = . . . = Î¸XZ(J) q Conditional or âPartialâ Odds Ratios q Marginal Odds Ratios Î¸Y Z(1) = . . . = Î¸Y Z(i) = . . . = Î¸Y Z(I) q Example of Marginal vs Partial Odds Ratios q Example: Partial Tables s There is âno interaction between any 2 variables in their q Marginal and Conditional Associations effects on the third variableâ. q Four Situations q Marginal s There is âno 3âway interactionâ among the variables. Independence/Conditional Dependence q Marginal s If one of the above holds, then the other two will also hold. Dependence/Conditional Independence s Conditional independence is a special case of this. q Conditional Independence q Example of Conditional For example, Independence: CAL q CAL Admissions Data by Department Î¸Y Z(1) = . . . = Î¸Y Z(i) = . . . = Î¸Y Z(I) = 1 q 3rd Example of Conditional Independence q 3rd Example: Partial Tables q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 22 of 54 (continued) Homogeneous Association (continued) Overview s There are even simpler independence conditions are that Marginal and Partial Tables special cases of homogeneous association, but this is a Conditional and Marginal Odds Ratios topic for another day. q Conditional or âPartialâ Odds Ratios s When these three conditions (equations) do not hold, then q Marginal Odds Ratios q Example of Marginal vs the conditional odds ratios for any pair of variables are not Partial Odds Ratios q Example: Partial Tables equal. Conditional odds ratios differ/depend on the level of q Marginal and Conditional Associations the third variable. q Four Situations q Marginal Independence/Conditional s Example of 3âway Interaction â the Age × Smoking × Dependence q Marginal Breath test results example. Dependence/Conditional Independence q Conditional Independence q Example of Conditional Independence: CAL q CAL Admissions Data by Department q 3rd Example of Conditional Independence q 3rd Example: Partial Tables q Simpsonâs Paradox q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 23 of 54 (continued) Example of Homogeneous Association Attitude Toward Media (Fienberg, 1980). âAre radio and TV networks doing a good, fair, or poor job?â Overview Response Marginal and Partial Tables Ë Î¸RQ1(1959) = (81)(243)/(325)(23) = Conditional and Marginal Odds Year Race Good Fair Poor Ratios Ë Î¸RQ1(1971) = (224)(636)/(600)(144) q Conditional or âPartialâ Odds Ratios 1959 Black 81 23 4 q Marginal Odds Ratios Ë Î¸RQ2(1959) = (23)(54)/(243)(4) = 1. q Example of Marginal vs White 325 243 54 Partial Odds Ratios q Example: Partial Tables Ë Î¸RQ2(1971) = (144)(158)/(636)(24) = q Marginal and Conditional 1971 Black 224 144 24 Associations Ë Î¸Y R(good) = (81)(600)/(325)(224) = q Four Situations q Marginal White 600 636 158 Independence/Conditional Ë Î¸Y R(f air) = (23)(636)/(243)(144) = Dependence q Marginal Dependence/Conditional Ë Î¸Y R(poor) = (4)(158)/(54)(24) = .4 Independence q Conditional Independence q Example of Conditional Ë Î¸Y Q1(black) = (81)(144)/(23)(224) = Independence: CAL q CAL Admissions Data by Ë Î¸Y Q1(white) = (325)(636)/(600)(243) Department q 3rd Example of Conditional Independence Ë Î¸Y Q2(black) = (23)(24)/(4)(144) = .9 q 3rd Example: Partial Tables q Simpsonâs Paradox Ë Î¸Y Q2(white) = (243)(158)/(54)(646) = q (Hypothetical) Example of Simpsonâs Paradox q Picture of Simpsonâs Paradox q Homogeneous Association q Homogeneous Association ThreeâWay Tables Slide 24 of 54 (continued) Statistical Inference & 3âWay Tables Overview (Large samples) Marginal and Partial Tables Conditional and Marginal Odds Ratios Weâll focus methods for 2 × 2 × K tables. Statistical Inference & 3âWay Tables q Statistical Inference & 3âWay Tables s Sampling Models for 3âWay tables. q Sampling Models for 3âWay Tables s Test of conditional independence. Tests of Conditional Independence s Estimating common odds ratio. Estimating Common Odds Ratio s Test of homogeneous association. Testing Homogeneity of Odds Ratios s Further Comments Concluding comments ThreeâWay Tables Slide 25 of 54 Sampling Models for 3âWay Tables Generalizations of the ones for 2âway tables, but there are now more possibilities. Overview Possible Sampling Models for 3âWay tables: Marginal and Partial Tables s Independent Poisson variates â nothing ďŹxed, each cell is Conditional and Marginal Odds Ratios Poisson. Statistical Inference & 3âWay s Multinomial counts with only the overall total n is ďŹxed. Tables q Statistical Inference & 3âWay Tables s Multinomial counts with ďŹxed sample size for each partial q Sampling Models for 3âWay Tables table. Tests of Conditional Independence For example, the partial tables of X × Y for each level of Z, Estimating Common Odds Ratio only the total of each of the K tables is ďŹxed, n++k . Testing Homogeneity of Odds Ratios s Independent binomial (or multinomial) samples within Concluding comments each partial table. For example, if n1+k and n2+k are ďŹxed in each 2 × 2 partial table of X crossed with Y for k = 1, . . . , K levels of Z, then we have independent binomial samples within each partial table. ThreeâWay Tables Slide 26 of 54 Tests of Conditional Independence Overview Two methods: Marginal and Partial Tables Conditional and Marginal Odds s Sum of test statistics for independence in each of the partial Ratios tables to get an overall chiâsquared statistic for âconditional Statistical Inference & 3âWay Tables independenceâ â this is the equivalent to a model based Tests of Conditional test discussed later in course. Independence q Tests of Conditional Independence q Cochran-Mantel-Haenszel s Cochran-Mantel-Haenszel Test â weâll talk about this one Test q Idea Behind the CMH Test ďŹrst. q Statistical Hypotheses q CMH Test Statistic q Properties of the CMH Test Statistic q More Properties of the CMH Test Statistic q Age × Smoking × Breath test results q CMH Statistic for Age × Smoking × Breath q CMH Example: CAL graduate admissions q Example: Table × Group × Response q Management × Supervisor × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 27 of 54 Cochran-Mantel-Haenszel Test Example: Cal graduate admission data s X: Gender (female, male). Overview s Y : Admission to graduate school (admitted, denied). Marginal and Partial Tables s Z: Department to which person applied (6 largest ones, Conditional and Marginal Odds Ratios AâF). Statistical Inference & 3âWay Tables So we have a 2 × 2 × 6 table of Gender by Admission by Tests of Conditional Department. Independence q Tests of Conditional For each Gender by Admission partial table (condition on Independence q Cochran-Mantel-Haenszel department), if we take the row totals (n1+k and n2+k ) and the Test q Idea Behind the CMH Test column totals (n+1k and n+2k ) as ďŹxed, then once we know the q Statistical Hypotheses q CMH Test Statistic value of a single cell within the table, we can ďŹll in the rest of q Properties of the CMH Test Statistic the table. For department A: q More Properties of the CMH Test Statistic Admitted? q Age × Smoking × Breath test results q CMH Statistic for Age × Gender Yes No Smoking × Breath q CMH Example: CAL graduate Female 89 (19) 108 admissions q Example: Table × Group × Response Male (512) (313) 825 q Management × Supervisor × Worker 601 332 933 q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 28 of 54 Idea Behind the CMH Test s From discussion of Fisherâs exact test, we know that the Overview distribution of 2 × 2 tables with ďŹxed margins is Marginal and Partial Tables hypergeometric. Conditional and Marginal Odds Ratios s Regardless of sampling scheme, if we consider row and Statistical Inference & 3âWay column totals of partial tables as ďŹxed, we can use Tables hypergeometric distribution to compute probabilities. Tests of Conditional Independence q Tests of Conditional s The test for conditional association uses one cell from each Independence q Cochran-Mantel-Haenszel partial table. Test q Idea Behind the CMH Test q Statistical Hypotheses s Historical Note: In developing this test, Mantel and Haenszel q CMH Test Statistic q Properties of the CMH Test were concerned with analyzing retrospective studies of Statistic q More Properties of the CMH diseases (Y ). They wanted to compare two groups (X) and Test Statistic q Age × Smoking × Breath adjust for a control variable (Z). Even though only 1 margin test results q CMH Statistic for Age × of the data (disease margin, Y ) is ďŹxed, they analyzed data Smoking × Breath q CMH Example: CAL graduate by conditioning on both the outcome (Y ) and group margins admissions q Example: Table × Group × (X) for each level of the control variable (Z). Response q Management × Supervisor × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 29 of 54 Statistical Hypotheses If the null hypothesis of conditional independence is true, i.e., Ho : Î¸XY (1) = . . . = Î¸XY (K) = 1 Overview Marginal and Partial Tables Then the mean of the (1,1) cell of kth partial table is Conditional and Marginal Odds n1+k n+1k Ratios Ë Ë Ë µ11k = E(n11k ) = µ11k = n++k Ď1+k Ď+1k = Statistical Inference & 3âWay n++k Tables Tests of Conditional and the variance of the (1,1) cell of the kth partial table is Independence q Tests of Conditional n1+k n2+k n+1k n+2k Independence Var(n11k ) = q Cochran-Mantel-Haenszel Test n2 (n++k â 1) ++k q Idea Behind the CMH Test q Statistical Hypotheses q CMH Test Statistic q Properties of the CMH Test If the null is false, then we expect that for tables where Statistic q More Properties of the CMH Test Statistic q Age × Smoking × Breath s Î¸XY (k) > 1 =â (n11k â µ11k ) > 0 test results q CMH Statistic for Age × s Î¸XY (k) < 1 =â (n11k â µ11k ) < 0 Smoking × Breath q CMH Example: CAL graduate admissions s Î¸XY (k) = 1 =â (n11k â µ11k ) â 0 q Example: Table × Group × Response q Management × Supervisor × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 30 of 54 CMH Test Statistic Mantel & Haenszel (1959) proposed the following statistic 1 ( |n11k â µ11k | â 2 )2 M2 = k Overview k Var(n11k ) Marginal and Partial Tables Conditional and Marginal Odds If Ho is true, then M 2 is approximately chi-squared with df = 1. Ratios Statistical Inference & 3âWay Cochran (1954) proposed a similar statistic, except that Tables s He did not include the continuity correction, ââ1/2â. Tests of Conditional Independence s He used a different Var(n11k ). q Tests of Conditional Independence q Cochran-Mantel-Haenszel Test The statistic the we will use is a combination of these two q Idea Behind the CMH Test q Statistical Hypotheses proposed statistics, the âCochran-Mantel-Haenszelâ statistic q CMH Test Statistic q Properties of the CMH Test [ k (n11k â µ11k )]2 Ë Statistic q More Properties of the CMH CM H = Test Statistic q Age × Smoking × Breath k Var(n11k ) test results q CMH Statistic for Age × Smoking × Breath where q CMH Example: CAL graduate admissions Ë s µ11k = n1+k n+1k /n++k q Example: Table × Group × Response q Management × Supervisor s Var(n11k ) = n1+k n2+k n+1k n+2k /n2 (n++k â 1) ++k × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 31 of 54 Properties of the CMH Test Statistic 2 ( k (n11k â µ11k )) CM H = Overview k Var(n11k ) Marginal and Partial Tables s For large samples, when Ho is true, CMH has a chi-squared Conditional and Marginal Odds Ratios distribution with df = 1. Statistical Inference & 3âWay s If all Î¸XY (k) = 1, then CMH is small (close to 0). Tables Tests of Conditional Ë Example: SES × Boy Scout × Deliquent. Since Î¸ = 1 for Independence q Tests of Conditional Independence each partial table, if we compute CM H, it would equal 0 and q Cochran-Mantel-Haenszel Test p-value=1.00. q Idea Behind the CMH Test q Statistical Hypotheses s If some/all Î¸XY (k) > 1, then CMH is large. q CMH Test Statistic q Properties of the CMH Test Statistic q More Properties of the CMH Example: Age × Smoking × Breath Test. Test Statistic q Age × Smoking test results × Breath Example: CAL graduate admissions data, q CMH Statistic for Age × Smoking × Breath Departments (6 versus 5) × Gender × Admission. q CMH Example: CAL graduate admissions s If some/all Î¸XY (k) < 1, then CMH is large. q Example: Table × Group × Response q Management × Supervisor × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 32 of 54 More Properties of the CMH Test Statistic 2 Overview ( k (n11k â µ11k )) CM H = k Var(n11k ) Marginal and Partial Tables Conditional and Marginal Odds Ratios s If some Î¸XY (k) > 1 and some Î¸XY (k) < 1, CM H test is not Statistical Inference & 3âWay Tables appropriate. Tests of Conditional Independence q Tests of Conditional Example: Three tables of Group × Response (hypothetical Independence q Cochran-Mantel-Haenszel âDIFâ case). Test q Idea Behind the CMH Test q Statistical Hypotheses s The test works well and is more powerful when Î¸XY (k) âs are q CMH Test Statistic q Properties of the CMH Test in the same direction and of comparable size. Statistic q More Properties of the CMH Test Statistic q Age × Smoking × Breath Example: Management quality × Worker satisfaction × test results q CMH Statistic for Age × Supervisorâs satisfaction. Smoking × Breath q CMH Example: CAL graduate admissions q Example: Table × Group × Response q Management × Supervisor × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 33 of 54 Age × Smoking × Breath test results Example: These data are from a study reported by Forthofer & Lehnen (1981) (Agresti, 1990). Subjects were whites who work Overview in certain industrial plants in Houston. Marginal and Partial Tables Partial Tables: Conditional and Marginal Odds Age < 40 Age 40â59 Ratios Statistical Inference & 3âWay Smoking Test Result Test Result Tables Tests of Conditional Status Normal Not Normal Normal Not Normal Independence q Tests of Conditional Never 577 34 611 164 4 168 Independence q Cochran-Mantel-Haenszel Test Current 682 57 739 245 74 319 q Idea Behind the CMH Test q Statistical Hypotheses 1259 91 1350 409 78 487 q CMH Test Statistic q Properties of the CMH Test Statistic q More Properties of the CMH Test Statistic Statistical Hypotheses: q Age × Smoking × Breath test results q CMH Statistic for Age × Smoking × Breath Ho : Î¸SB(<40) = Î¸SB(40â50) = 1 q CMH Example: CAL graduate admissions q Example: Table × Group × HA : Smoking and test results are conditionaly dependent. Response q Management × Supervisor × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 34 of 54 CMH Statistic for Age × Smoking × Breath Overview Age < 40 Age 40â59 Marginal and Partial Tables Ë Î¸1 = 1.418 Ë Î¸2 = 12.38 Conditional and Marginal Odds Ratios Ë µ111 = (611)(1259)/1350 = 569.81 Ë µ112 = (168)(409)/487 = 141.09 Statistical Inference & 3âWay Tables Ë n111 â µ111 = 577 â 569.81 = 7.19 Ë n112 â µ112 = 164 â 141.09 = 22.91 Tests of Conditional (611)(739)(1259)(91) (168)(319)(409)(78) Independence var(n111 ) = 13502 (1350â1) = 21.04 var(n111 ) = 4872 (487â1) = 14. q Tests of Conditional Independence q Cochran-Mantel-Haenszel Test (7.19 + 22.91)2 q Idea Behind the CMH Test CM H = q Statistical Hypotheses q CMH Test Statistic 21.04 + 14.83 q Properties of the CMH Test Statistic q More Properties of the CMH Test Statistic q Age × Smoking × Breath = 24.24 test results q CMH Statistic for Age × Smoking × Breath q CMH Example: CAL graduate admissions q Example: Table × Group × Response with df = 1 has pâvalue < .001. q Management × Supervisor × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 35 of 54 CMH Example: CAL graduate admissions The null hypothesis of no sex discrimination is Î¸GA(1) = Î¸GA(2) = Î¸GA(3) = Î¸GA(4) = Î¸GA(5) = Î¸GA(6) = 1 Overview Marginal and Partial Tables Department A Department B Department C Gender admit deny admit deny admit deny Conditional and Marginal Odds Ratios female 89 19 108 17 8 25 202 391 593 male 512 313 825 353 207 560 120 205 325 Statistical Inference & 3âWay Tables 601 332 933 370 215 585 322 596 918 Tests of Conditional Department D Department E Department F Independence Gender admit deny admit deny admit deny q Tests of Conditional female 131 244 375 94 299 393 24 317 341 Independence q Cochran-Mantel-Haenszel male 138 279 417 53 138 191 22 351 373 Test 269 523 792 147 437 584 46 668 714 q Idea Behind the CMH Test q Statistical Hypotheses q CMH Test Statistic q Properties of the CMH Test (19.42 + 1.19 â 6.00 + 3.63 â 4.92 + 2.03)2 Statistic CM H = q More Properties of the CMH 21.25 + 5.57 + 47.86 + 44.34 + 24.25 + 10.75 Test Statistic q Age × Smoking × Breath = (15.36)2 /154.02 test results q CMH Statistic for Age × Smoking × Breath = 1.53 (pâvalue = .217) q CMH Example: CAL graduate admissions q Example: Table × Group × Response Ë Department A: Î¸A = 2.86, G2 = 17.248, df = 1, pâvalue< .001. q Management × Supervisor × Worker Without Department A: CM H = .125, pâvalue= .724. q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 36 of 54 Example: Table × Group × Response (Hypothetical DIF data) Z=1 Z=2 Z=3 Overview Group yes no Group yes no Group yes no Marginal and Partial Tables Conditional and Marginal Odds A 5 15 20 A 10 10 20 A 15 5 Ratios B 15 5 20 B 10 10 20 B 5 15 Statistical Inference & 3âWay Tables 20 20 40 20 20 40 20 20 Tests of Conditional Independence q Tests of Conditional Î¸ = 0.11 Î¸ = 1.00 Î¸ = 9.00 Independence q Cochran-Mantel-Haenszel Test q Idea Behind the CMH Test q Statistical Hypotheses ((5 â 10) + (10 â 10) + (15 â 10))2 q CMH Test Statistic q Properties of the CMH Test CM H = 3 Statistic q More Properties of the CMH k=1 Var(n11k ) Test Statistic q Age × Smoking × Breath test results (â5 + 0 + 5)2 q CMH Statistic for Age × = 3 Smoking × Breath q CMH Example: CAL graduate k=1 Var(n11k ) admissions q Example: Table × Group × Response q Management × Supervisor = 0 × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Why is this test a bad thing to do here? Slide 37 of 54 Management × Supervisor × Worker Bad Management Good Management Supervisor Worker Job Worker Job Overview Marginal and Partial Tables Satisfaction Low High Low High Conditional and Marginal Odds Low 103 87 190 Low 59 109 168 Ratios Statistical Inference & 3âWay High 32 42 74 High 78 205 283 Tables Tests of Conditional 135 129 264 137 314 448 Independence q Tests of Conditional Independence Ë Î¸bad = 1.55 and 95% CI for Î¸bad (.90, 1.67) q Cochran-Mantel-Haenszel Test Ë Î¸good = 1.42 and 95% CI for Î¸good (.94, 2.14) q Idea Behind the CMH Test q Statistical Hypotheses q CMH Test Statistic q Properties of the CMH Test Statistic Bad Management Good Management q More Properties of the CMH Test Statistic q Age × Smoking × Breath Statistic df Value pâvalue Value pâvalue test results q CMH Statistic for Age × X2 1 2.56 .11 2.85 .09 Smoking × Breath q CMH Example: CAL graduate admissions G2 1 2.57 .11 2.82 .09 q Example: Table × Group × Response q Management × Worker × Supervisor Note: G2 = 2.57 + 2.82 = 5.39 with df = 2 has pâvalue= .068. q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 38 of 54 Management × Supervisor × Worker (continued) s Combining the results from these two tables to test Overview conditional independence yields G2 = 2.57 + 2.82 = 5.39 with Marginal and Partial Tables df = 2 has pâvalue= .068. Conditional and Marginal Odds Ratios s Conclusion: Statistical Inference & 3âWay Tables HO : Conditional independence, Î¸SW (bad) = Î¸SW (good) = 1, is Tests of Conditional a tenable hypothesis. Independence q Tests of Conditional Independence q Cochran-Mantel-Haenszel s Ë Ë Since Î¸bad â Î¸good , CMH should be more powerful. Test q Idea Behind the CMH Test q Statistical Hypotheses CM H = 5.43 pâvalue = .021 q CMH Test Statistic q Properties of the CMH Test Statistic q More Properties of the CMH Test Statistic q Age × Smoking × Breath s Next steps: test results q CMH Statistic for Age × x Estimate the common odds ratio. Smoking × Breath q CMH Example: CAL graduate admissions x Test for homogeneous association. q Example: Table × Group × Response q Management × Supervisor × Worker q Management × Supervisor × Worker (continued) ThreeâWay Tables Slide 39 of 54 Estimating Common Odds Ratio For a 2 × 2 table where Î¸XY (1) = . . . = Î¸XY (K ), the âMantel-Haenszel Estimatorâ of a common value of the odds Overview ratio is k (n11k n22k /n++k ) Marginal and Partial Tables Conditional and Marginal Odds Ë Î¸M H = Ratios k (n12k n21k /n++k ) Statistical Inference & 3âWay Tables For the blue-collar worker example, this value is Tests of Conditional Independence Ë (103)(42)/264 + (59)(205)/448 Estimating Common Odds Ratio Î¸M H = q Estimating Common Odds (32)(87)/264 + (78)(109)/448 Ratio q SE for Common Odds Ratio 16.39 + 27.12 Estimate q SAS input & Common Odds = Ratio Estimate 10.55 + 18.98 q Notes Regarding CMH = 43.51/29.52 = 1.47 Testing Homogeneity of Odds Ratios Concluding comments Which is in between the two estimates from the two partial tables: Ë Î¸bad = 1.55 and Ë Î¸good = 1.42 ThreeâWay Tables Slide 40 of 54 SE for Common Odds Ratio Estimate For our example, 95% conďŹdence interval for Î¸ ââ (1.06, 2.04) Overview Marginal and Partial Tables Conditional and Marginal Odds Ratios Ë The standard error for Î¸M H is complex, so we will rely on Statistical Inference & 3âWay SAS/FREQ to get this. When you supply the âCMHâ option to Tables Tests of Conditional the TABLES command, you will get both CMH test statistic and Independence Ë Î¸M H along with a 95% conďŹdence interval for Î¸. Estimating Common Odds Ratio q Estimating Common Odds Ratio SAS output: q SE for Common Odds Ratio Estimate q SAS input & Common Odds Estimates of the Common Relative Risk (Row1/Row Ratio Estimate q Notes Regarding CMH Type of Study Method Value 95% ConďŹdence Limits Testing Homogeneity of Odds Case-Control Mantel-Haenszel 1.4697 1.0600 2.037 Ratios Concluding comments (Odds Ratio) Logit 1.4692 1.0594 2.037 ThreeâWay Tables Slide 41 of 54 SAS input & Common Odds Ratio Estimate DATA sat; INPUT manager $ super $ worker $ count; Overview LABEL manager=âQuality of managementâ Marginal and Partial Tables super =âSupervisors Satisfactionâ Conditional and Marginal Odds worker=âBlue Collar Workers Satisfactionâ; Ratios Statistical Inference & 3âWay DATALINES; Tables Bad Low Low 103 Tests of Conditional Independence Bad Low High 87 Estimating Common Odds Ratio q Estimating Common Odds . . . . . . . . Ratio . . . . q SE for Common Odds Ratio Estimate q SAS input & Common Odds Good High Low 78 Ratio Estimate q Notes Regarding CMH Good High High 205 Testing Homogeneity of Odds Ratios Concluding comments PROC FREQ DATA=sat ORDER= data; WEIGHT count; TABLES manage*super*worker /nopercent norow nocol chisq cmh; run; ThreeâWay Tables Slide 42 of 54 Notes Regarding CMH s If we have homogeneous association, i.e., Î¸XY (1) = . . . = Î¸XY (K) Overview Marginal and Partial Tables Ë then Î¸M H is useful as an estimate of the this common odds Conditional and Marginal Odds Ratios ratio. Statistical Inference & 3âWay Tables s If the odds ratios are not the same but they are at least in the Tests of Conditional Ë same direction, then Î¸M H can be useful as a summary Independence statistic of the K conditional (partial) associations. Estimating Common Odds Ratio q Estimating Common Odds s If thereâs a 3-way interaction, it is misleading to use an Ratio q SE for Common Odds Ratio Estimate estimate of the common odds ratio. e.g., Age × Smoking × q SAS input & Common Odds Ratio Estimate Breath test results, we get as a common estimate of the q Notes Regarding CMH odds ratio Testing Homogeneity of Odds Ë Î¸SB = 2.57 Ratios Concluding comments But the ones from the separate tables are Ë Î¸SB(<40) = 1.42 and Ë Î¸SB(40â59) = 12.38 ThreeâWay Tables Slide 43 of 54 Testing Homogeneity of Odds Ratios s For 2 × 2 × K tables. s Since Î¸XY (1) = . . . = Î¸XY (K) implies both Overview Î¸Y Z(1) = . . . = Î¸Y Z(I) and Î¸XZ(1) = . . . = Î¸XZ(J) Marginal and Partial Tables Conditional and Marginal Odds To test for homogeneous association we only need to test Ratios Statistical Inference & 3âWay one of these, e.g. Tables Tests of Conditional HO : Î¸XY (1) = . . . = Î¸XY (K) Independence Estimating Common Odds Ratio Testing Homogeneity of Odds Ratios s Given estimated expected frequencies assuming that HO is q Testing Homogeneity of Odds Ratios true, the test statistic we use is the âBreslow-Dayâ statistic, q Breslow-Day statistic q Breslow-Day statistic which is like Pearsonâs X 2 : q Examples: Testing Homogeneity of Association 2 (nijk â µijk )2 Ë q Cal Graduate Admissions X = data q Cal Graduate Admissions i j Ë µijk data k q Group × Response ×Z q Year × Race × Response to Question q Year × Race × Response s If HO is true, then the Breslow-Day statistic has an to Question q One Last Example: Hurricane approximate chi-squared distribution with df = K â 1. Katrina Concluding comments ThreeâWay Tables Slide 44 of 54 Breslow-Day statistic s Ë We need µijk for each table assuming that the null hypothesis of homogeneous association is true. Overview s µ Ë Ë Ë {Ë11k , µ12k , µ21k , µ22k }, are found such that Marginal and Partial Tables s The margins of the table of estimated expected frequencies Conditional and Marginal Odds Ratios equal the observed margins; that is, Statistical Inference & 3âWay Tables Tests of Conditional Ë µ11k Ë µ12k µ Ë (Ë11k + µ12k ) = n1+k Independence Estimating Common Odds Ratio Ë µ21k Ë µ22k µ Ë (Ë21k + µ22k ) = n2+k Testing Homogeneity of Odds Ratios n+1k n+2k n++k q Testing Homogeneity of Odds Ratios s Ë If the null hypothesis of homogeneous association is true, then Î¸M H q Breslow-Day statistic q Breslow-Day statistic q Examples: Testing is a good estimate of the common odds ratio. When computing Homogeneity of Association q Cal Graduate Admissions estimated expected frequencies, we want them such that the odds data q Cal Graduate Admissions ratio computed on each of the K partial tables equals the data q Group × Response ×Z Mantel-Haenszel estimate of the common odds ratio. q Year × Race × Response to Question q Year × Race × Response Ë Ë Ë µ11k µ22k to Question Î¸M H = q One Last Example: Hurricane Ë Ë µ12k µ21k Katrina Concluding comments ThreeâWay Tables Slide 45 of 54 Breslow-Day statistic s Computation of the estimated expected frequencies is a bit complex, so we will rely on SAS/FREQ to give us the Overview Breslow-Day statistic. If you have a 2 × 2 × K table and Marginal and Partial Tables request âCMHâ options with the TABLES command, you will Conditional and Marginal Odds Ratios automatically get the Breslow-Day statistic. Statistical Inference & 3âWay Tables s SAS output for manager × supervisor × worker is Tests of Conditional Breslow-Day Test for Independence Estimating Common Odds Ratio Homogeneity of the Odds Ratios Testing Homogeneity of Odds Chi-Square 0.0649 Ratios q Testing Homogeneity of Odds Ratios DF 1 q Breslow-Day statistic q Breslow-Day statistic Pr > ChiSq 0.7989 q Examples: Testing Homogeneity of Association q Cal Graduate Admissions s For this test, your sample size should be relatively large, i.e., data q Cal Graduate Admissions data Ë µijk âĽ 5 for at least 80% of cells q Group × Response ×Z q Year × Race × Response to Question q Year × Race × Response to Question q One Last Example: Hurricane Katrina Concluding comments ThreeâWay Tables Slide 46 of 54 Examples: Testing Homogeneity of Associati Worker × Supervisor × Management s CM H = 5.34 with pâvalue= .02 =â Overview conditionally dependent. Marginal and Partial Tables Conditional and Marginal Odds s The Mantel-Haenszel estimate of common odds ratio Ratios Statistical Inference & 3âWay Ë Î¸M H = 1.47 Tables Tests of Conditional while the separate ones were Independence Estimating Common Odds Ratio Ë Î¸bad = 1.55 and Ë Î¸good = 1.42 Testing Homogeneity of Odds Ratios q Testing Homogeneity of Odds Ratios q Breslow-Day statistic q Breslow-Day statistic s Now letâs test the homogeneity of the odds ratios q Examples: Testing Homogeneity of Association q Cal Graduate Admissions HO : Î¸W S(bad) = Î¸W S(good) . data q Cal Graduate Admissions data q Group × Response ×Z q Year × Race × Response to Question Breslow-Day statistic = .065, df = 1, and pâvalue= .80. q Year × Race × Response to Question q One Last Example: Hurricane Katrina Concluding comments ThreeâWay Tables Slide 47 of 54 Cal Graduate Admissions data Six of the largest departments: Overview s CM H = 1.53, df = 1, pâvalue= .217 =â Marginal and Partial Tables gender and admission are conditionally independent Conditional and Marginal Odds (given department). Ratios s Mantel-Haenszel estimate of the common odds ratio Statistical Inference & 3âWay Tables Ë Î¸GA = .91 Tests of Conditional Independence Estimating Common Odds Ratio and the 95% ConďŹdence interval is Testing Homogeneity of Odds Ratios q Testing Homogeneity of Odds (.772, 1.061). Ratios q Breslow-Day statistic q Breslow-Day statistic s Now letâs test homogeneity of odds ratios q Examples: Testing Homogeneity of Association q Cal Graduate Admissions Ho : Î¸GA(a) = Î¸GA(b) = Î¸GA(c) = Î¸GA(d) = Î¸GA(e) = Î¸GA(f ) data q Cal Graduate Admissions data Breslow-Day statistic = 18.826, df = 5, pâvalue= .002. q Group × Response ×Z q Year × Race × Response to Question q Year × Race × Response Whatâs going on? to Question q One Last Example: Hurricane Katrina Concluding comments ThreeâWay Tables Slide 48 of 54 Cal Graduate Admissions data Drop Department A, which is the only department for which the odds ratio appears to differ from 1. Overview s CM H = .125, df = 1, pâvalue= .724 =â Marginal and Partial Tables gender and admission are conditionally independent Conditional and Marginal Odds Ratios (given department) Statistical Inference & 3âWay . Tables s The Mantel-Haneszel estimate of the common odds ratio Tests of Conditional Independence Ë Î¸ = 1.031 Estimating Common Odds Ratio Testing Homogeneity of Odds Ratios and the 95% conďŹdence interval for Î¸GA is q Testing Homogeneity of Odds Ratios q Breslow-Day statistic (.870, 1.211) q Breslow-Day statistic q Examples: Testing Homogeneity of Association . q Cal Graduate Admissions data q Cal Graduate Admissions s The test of homogeneity of odds ratios data q Group × Response ×Z q Year × Race × Response HO : Î¸GA(b) = Î¸GA(c) = Î¸GA(d) = Î¸GA(e) = Î¸GA(f ) to Question q Year × Race × Response to Question q One Last Example: Hurricane Breslow-Day statistic = 2.558, df = 4, p-value= .63. Katrina Concluding comments ThreeâWay Tables Conclusion?. Slide 49 of 54 Group × Response × Z (Hypothetical DIF Example) Overview Marginal and Partial Tables s CM H = 0.00, df = 1, and pâvalue= 1.00 =â Conditional and Marginal Odds Ratios Group and response are independent given Z Statistical Inference & 3âWay . Tables Tests of Conditional s Mantel-Haenszel estimate of the common odds ratio Independence Ë Î¸GR = 1.00 Estimating Common Odds Ratio Testing Homogeneity of Odds Ratios . q Testing Homogeneity of Odds Ratios q Breslow-Day statistic s Test for homogeneity of the odds ratios yields q Breslow-Day statistic q Examples: Testing Breslow-Day statistic = 20.00, df = 2, and pâvalue< .001. Homogeneity of Association q Cal Graduate Admissions data q Cal Graduate Admissions data s Conclusion? q Group × Response ×Z q Year × Race × Response to Question q Year × Race × Response to Question q One Last Example: Hurricane Katrina Concluding comments ThreeâWay Tables Slide 50 of 54 Year × Race × Response to Question Response to question âAre radio and TV networks doing a good, fair, or poor job?â Overview Marginal and Partial Tables Response Conditional and Marginal Odds Year Race Good Fair Poor Ratios Statistical Inference & 3âWay 1959 Black 81 23 4 Tables Tests of Conditional White 325 243 54 Independence Estimating Common Odds Ratio 1971 Black 224 144 24 Testing Homogeneity of Odds White 600 636 158 Ratios q Testing Homogeneity of Odds Ratios q Breslow-Day statistic q Breslow-Day statistic We could test for conditional independence, but which variable q Examples: Testing Homogeneity of Association should be condition on? q Cal Graduate Admissions data s Year and look at Race × Response to the Question? q Cal Graduate Admissions data q Group × Response q Year × Race × Response ×Z s Race and look at Year × Response to the Question? to Question q Year × Race × Response s Response to the Question and look at Year × Race? to Question q One Last Example: Hurricane Katrina Concluding comments ThreeâWay Tables Slide 51 of 54 Year × Race × Response to Question s Since the Breslow-Day statistic only works for 2 × 2 × K tables, to test for homogeneous association we will set up Overview the test for Marginal and Partial Tables HO : Î¸Y R(good) = Î¸Y R(f air) = Î¸Y R(poor) Conditional and Marginal Odds Ratios Statistical Inference & 3âWay even though we are more interested in the odds ratios Tables between Year & Response and Race & Response. Tests of Conditional Independence Estimating Common Odds Ratio s Breslow-Day statistic = 3.464, df = 2, p-value= .18. Testing Homogeneity of Odds Ratios q Testing Homogeneity of Odds Note: There is a generalization of CMH for I × J × K tables Ratios q Breslow-Day statistic and we can get an estimate of the common odds ratio q Breslow-Day statistic q Examples: Testing Ë between Year and Race (i.e., Î¸M H = .57), what weâld really Homogeneity of Association q Cal Graduate Admissions like are estimates of common odds ratios between Year and data q Cal Graduate Admissions Question and between Race and Question. data q Group × Response ×Z q Year × Race × Response to Question q Year × Race × Response to Question q One Last Example: Hurricane Katrina Concluding comments ThreeâWay Tables Slide 52 of 54 One Last Example: Hurricane Katrina Reference: http://www.bls.gov/katrina/cpscesquestions.htm The effects of hurricane Katrina on BLS employment and Overview unemployment data collection. Marginal and Partial Tables s Employment status (employed, unemployed, not in labor Conditional and Marginal Odds Ratios force). Statistical Inference & 3âWay s Residence (same or different than in August). Tables Tests of Conditional s Month data from (October, November) Independence The data (in thousands): Estimating Common Odds Ratio Testing Homogeneity of Odds October November Ratios q Testing Homogeneity of Odds Ratios Same Different Same Different q Breslow-Day statistic q Breslow-Day statistic Employed 153 179 204 185 q Examples: Testing Homogeneity of Association q Cal Graduate Admissions Unemployed 18 90 29 71 data q Cal Graduate Admissions data Not in labor 134 217 209 188 q Group × Response ×Z q Year × Race × Response to Question q Year × Race × Response to Question q One Last Example: Hurricane Katrina Concluding comments ThreeâWay Tables Slide 53 of 54 Concluding comments on use & interpretation CMH & Breslow-Day Overview Marginal and Partial Tables s There is a generalization of CMH for I × J × K tables (which Conditional and Marginal Odds SAS/FREQ will perform). Ratios s There is not such a generalization for the Breslow-Day Statistical Inference & 3âWay Tables statistic. Tests of Conditional Independence s Given that we can get a non-signiďŹcant result using CMH Estimating Common Odds Ratio when there is association in partial tables, you should check Testing Homogeneity of Odds to see whether there is homogeneous association or a Ratios 3âway association. Concluding comments q Concluding comments on use s Breslow-Day statistic does not work well for small samples, & interpretation of while the Cochern-Mantel-Haenszel does pretty well. s A modeling approach handles I × J × K tables and can test the same hypotheses. ThreeâWay Tables Slide 54 of 54