1 / 25

Log-linear Models

Log-linear Models. For 2-dimensional tables. Two-Factor ANOVA (Mean rot of potatoes). Main effects are deviations of marginal means from the grand mean.

stephanx
Download Presentation

Log-linear Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Log-linear Models For 2-dimensional tables

  2. Two-Factor ANOVA(Mean rot of potatoes)

  3. Main effects are deviations of marginal means from the grand mean. • Interaction represents how the profile of means for one variable depends on the level of the other variable – departure from an additive model. Main effects add to zero and interactions add to zero

  4. Plotting Interactions

  5. For a table with I rows and J columns Compare Variable Level

  6. Linear Model for the Log Expected Frequency Main effects are deviations of marginal mean log expected frequency from the grand mean of the log expected frequencies.

  7. Interaction terms Represent Relationship between Variables • Interaction means the pattern of probabilities for one variable depends on the value of the other variable. This means they are related. • See how it works for a 2x2 table • Start with the cross-product ratio alpha (not the same as the significance level, and not a main effect).

  8. The cross-product ratio is an index of relationship

  9. alpha=1 means no relationship

  10. There really are 3 parameters

  11. Independence => alpha=1 <=> interaction = 0

  12. Representing the probability of an event by p (Could be conditional) • If p=1/2, odds = .5/(1-.5) = 1 (to 1) • If p=2/3, odds = 2 (to 1) • If p=3/5, odds = (3/5)/(2/5) = 1.5 (to 1) • If p=1/5, odds = .25 (to 1)

  13. Odds Ratio • Conditional odds of being in Col One given in Row One • Conditional odds of being in Col One given in Row Two = p21/p22 • Ratio of these two quantities is

  14. The (estimated) odds of being accepted are times as great in Department A, compared to Department F.

  15. Some things to notice • The cross-product (odds) ratio is meaningful for large tables; apply it to 2x2 sub-tables. • Re-arrange rows and columns as desired to get the cell you want in the upper left position. • Combining rows or columns (especially columns) by adding the frequencies is natural and valid. • If you hear something like “Chances of death before age 50 are four times as great for smokers,” most likely they are talking about an odds ratio.

  16. No relationship means parallel slopes in the log scale Also applies to expected frequencies

  17. Plot Log Observed Frequencies

  18. The loglin Command

  19. A General Rule • For any 2-dimensional table, maximum likelihood under the null hypothesis of independence yields the same estimated expected frequencies used by the Pearson chisquare test. • So you can always use • And calculate either test statistic with df = (I-1)(J-1) • Trust Pearson statistic more for smaller samples.

  20. MLEs and parameters obey the same relationships.

More Related