{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# lec3 - For the two-way table the log-linear model can be...

This preview shows pages 1–5. Sign up to view the full content.

For the two-way table, the log-linear model can be used to test indepen- dence of the row and column variables or marginal homogeneity across rows. Both hypotheses are equivalent to the hypothesis H 0 : λ XY ij = 0 for all i, j , based on the saturated model log( μ ij ) = λ + λ X i + λ Y j + λ XY ij H 0 can be tested by comparing the deviance from this model with the deviance from the nested model log( μ ij ) = λ + λ X i + λ Y j ( * ) It can be shown that an equivalent test is to compare G 2 = 2 X i,j n ij log( n ij / ˆ μ ij ) with the χ 2 (( I - 1)( J - 1)) distribution, where ˆ μ ij ’s are the MLEs under independence (based on model (*)). It is important to realize that log-linear models make no distinction between response and explanatory variables. They are inherently multivariate. (We model the n ij ’s not the values of X or Y .) When such a distinction is appropriate, it may be more natural to use multinomial response models (logit, multinomial logit, others – we’ll talk about these later). For many multinomial response logit models, equivalent log-linear models exist. 201

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Example – 2 × 2 Table: In this case, Y = 1 Y = 2 X = 1 π 11 π 12 X = 2 π 12 π 22 represents the table of cell probabilities and Y = 1 Y = 2 X = 1 μ 11 μ 12 X = 2 μ 12 μ 22 represents the table of cell means. Logit model: log π i 1 π i 2 = β 0 , i = 1 , 2 Log-linear model: log( μ ij ) = λ + λ X i + λ Y j , i = 1 , 2 , j = 1 , 2 Both of these are independence models. The log-linear model parameters have interpretations in terms of β 0 , the common log odds of Y = 1 over the two rows: β 0 = logit( π i 1 ) = log( μ i 1 ) - log( μ i 2 ) = λ Y 1 - λ Y 2 * = 2 λ Y 1 *- under sum-to-zero constraints. 202
Another Example – 2 × 2 × 2 Table: Suppose a 3-way table is formed by the combinations of levels of X, Y, Z where each variable has 2-levels. Let i index the levels of X , j index the levels of Y , and k index the levels of Z . Consider the model where Y is jointly independent of X and Z . This corresponds to the logit model log π i 1 k π i 2 k = β 0 , i = 1 , 2 , k = 1 , 2 When Y is jointly independent of X, Z , π ijk = π i · k π · j · μ ijk = ijk log( μ ijk ) = log( n ) + log( π i · k ) + log( π · j · ) = λ + λ X i + λ Z k + λ XZ ik + λ Y j is the corresponding log-linear model. The constant log-odds that Y = 1 over the levels of X and Z is β 0 = log π i 1 k π i 2 k = log μ i 1 k μ i 2 k = λ + λ X i + λ Z k + λ XZ ik + λ Y 1 - ( λ + λ X i + λ Z k + λ XZ ik + λ Y 2 ) = λ Y 1 - λ Y 2 * = 2 λ Y 1 *- under sum-to-zero constraints. For the set-the-last-level-to-zero constraints, β 0 = λ Y 1 . 203

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
The saturated logistic model for this 2 × 2 × 2 situation is log π i 1 k π i 2 k = β 0 + β X i + β Z k + β XZ ik where β X i represents the effect of the i th level of X, etc. The equivalent saturated log-linear model is log( μ ijk ) = λ + λ X i + λ Y j + λ Z k + λ XY ij + λ XZ ik + λ Y Z jk + λ XY Z ijk and, for sum-to-zero constraints in both models, we obtain β 0 = 2 λ Y 1 , β X i = 2 λ XY i 1 , β Z k = 2 λ XZ 1 k and β XZ ik = 2 λ XY Z i 1 k Interpretations in terms of odds-ratios can also be obtained from the log- linear model.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 64

lec3 - For the two-way table the log-linear model can be...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online