Presentation is loading. Please wait.

Presentation is loading. Please wait.

Loglinear Models for Contingency Tables. Consider an IxJ contingency table that cross- classifies a multinomial sample of n subjects on two categorical.

Similar presentations


Presentation on theme: "Loglinear Models for Contingency Tables. Consider an IxJ contingency table that cross- classifies a multinomial sample of n subjects on two categorical."— Presentation transcript:

1 Loglinear Models for Contingency Tables

2 Consider an IxJ contingency table that cross- classifies a multinomial sample of n subjects on two categorical responses. The cell probabilities are (  i j ) and the expected frequencies are (  i j = n  i j ). Loglinear model formulas use (  i j = n  i j ) rather than (  i j ), so they also apply with Poisson sampling for N = IJ independent cell counts (Y i j ) having {  i j =E(Y i j ) }. In either case we denote the observed cell counts by (n ij )

3 Independence Model Under statistical independence For multinomial sampling Denote the row variable by X and the column variable by Y The formula expressing independence is multiplicative

4

5

6 The tests using X 2 and G 2 are also goodness-of-fit tests of this loglinear model. Loglinear models for contingency tables are GLMs that treat the N cell counts as independent observations of a Poisson random component. Loglinear GLMs identify the data as the N cell counts rather than the individual classifications of the n subjects. The expected cell counts link to the explanatory terms using the log link

7 The model does not distinguish between response and explanatory variables. It treats both jointly as responses, modeling  ij for combinations of their levels. To interpret parameters, however, it is helpful to treat the variables asymmetrically.

8 We illustrate with the independence model for Ix2 tables. In row i, the logit equals

9

10 An analogous property holds when J>2. Differences between two parameters for a given variable relate to the log odds of making one response, relative to the other, on that variable

11 Saturated Model

12

13 Parameter Estimation

14

15 INFERENCE FOR LOGLINEAR MODELS

16 Example for Saturated Model SexPartyTotal DemocratRepublic Male222 (204.32)115 (132.68)337 Female240 (257.68)185 (167.32)425 Total462300762 SexPartyTotal DemocratRepublic MaleLog(204.32) = 5.32Log(132.68) = 4.8910.21 FemaleLog(257.68) = 5.55Log(167.32) = 5.1210.67 Total10.8710.0120.88

17

18

19

20


Download ppt "Loglinear Models for Contingency Tables. Consider an IxJ contingency table that cross- classifies a multinomial sample of n subjects on two categorical."

Similar presentations


Ads by Google