13.11.2012 Views

Introduction to Categorical Data Analysis

Introduction to Categorical Data Analysis

Introduction to Categorical Data Analysis

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

212 LOGLINEAR MODELS FOR CONTINGENCY TABLES<br />

Table 7.6 shows software output, using constraints for which parameters at the second<br />

level of any variable equal 0. Thus, ˆλ AC<br />

22 = ˆλ AC<br />

12 = ˆλ AC<br />

21 = 0, and the estimated<br />

) = exp(2.05) = 7.8.<br />

conditional AC odds ratio is exp(ˆλ AC<br />

11<br />

7.2 INFERENCE FOR LOGLINEAR MODELS<br />

Table 7.5 shows that estimates of conditional and marginal odds ratios are highly<br />

dependent on the model. This highlights the importance of good model selection.<br />

An estimate from this table is informative only if its model fits well. This section<br />

shows how <strong>to</strong> check goodness of fit, conduct inference, and extend loglinear models<br />

<strong>to</strong> higher dimensions.<br />

7.2.1 Chi-Squared Goodness-of-Fit Tests<br />

Consider the null hypothesis that a given loglinear model holds.As usual, large-sample<br />

chi-squared statistics assess goodness of fit by comparing the cell fitted values <strong>to</strong> the<br />

observed counts. In the three-way case, the likelihood-ratio and Pearson statistics are<br />

G 2 = 2 � � �<br />

nij k<br />

nij k log , X<br />

ˆμij k<br />

2 = � (nij k −ˆμij k) 2<br />

ˆμij k<br />

The G 2 statistic is the deviance for the model (recall Section 3.4.3). The degrees of<br />

freedom equal the number of cell counts minus the number of model parameters. The<br />

df value decreases as the model becomes more complex. The saturated model has<br />

df = 0.<br />

For the student drug survey (Table 7.3), Table 7.7 presents goodness-of-fit tests<br />

for several models. For a given df , larger G 2 or X 2 values have smaller P -values<br />

Table 7.7. Goodness-of-Fit Tests for Loglinear Models Relating Alcohol (A),<br />

Cigarette (C), and Marijuana (M) Use<br />

Model G 2 X 2 df P -value ∗<br />

(A, C, M) 1286.0 1411.4 4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!