CarolynJ. Anderson Department of Educational Psychology by fws15200

VIEWS: 8 PAGES: 54

									                    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 fixed levels of the third variable.
Partial Odds Ratios
q Example: Partial Tables
q Marginal and Conditional
Associations
                                  For fixed 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

                                  Definition: 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 fixed, each cell is
Conditional and Marginal Odds
Ratios                              Poisson.
Statistical Inference & 3–Way
                                  s Multinomial counts with only the overall total n is fixed.
Tables
q Statistical Inference & 3–Way
Tables                            s Multinomial counts with fixed 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 fixed, 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 fixed 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
                                    first.
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 fixed, then once we know the
q Statistical Hypotheses
q CMH Test Statistic            value of a single cell within the table, we can fill 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 fixed 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 fixed, 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 fixed, 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% confidence 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% confidence 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% Confidence 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% Confidence 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% confidence 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-significant 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

								
To top