University of Southampton · FACULTY OF STATISTICS

STAT6135 Chap.9 Log-linear Models for Multi-way Tables

- one subject, every graph, every model, every mark
7 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 9 of 9 · STAT6135

Log-linear Models for Multi-way Tables

Log-linear Models for Multi-way Tables treats every cell count of a contingency table as a Poisson response and models the log of its expected value with main-effect and interaction terms. In a two-way table the log odds ratio depends only on the interaction terms, so setting them to zero is the same as independence, and testing the main-effects model against the saturated model is the chi-squared test of independence.

The belief-in-afterlife example shows the independence model fitting well. Different sampling schemes, Poisson, multinomial and product multinomial, give the same estimates as long as the model contains the terms for the totals fixed by design, which is why Poisson fitting is always allowed.

For three-way tables the module uses hierarchical models named by their generating class, with nine models from mutual independence through joint and conditional independence to homogeneous association and the saturated model. Partial tables fix the third factor and marginal tables add over it, and conditional independence can coexist with marginal association.

Simpson's paradox, illustrated with death-penalty data and the Berkeley admissions worksheet, shows a marginal association reversing once a confounder is controlled. Model selection usually works backwards from the saturated model by deviance differences, and logistic models correspond to log-linear models that include the margin of the explanatory factors.

In this chapter

What this chapter covers

  • 01

    Two-way log-linear models and the lambda notation

  • 02

    Interaction terms as odds ratios

  • 03

    Poisson, multinomial and product multinomial sampling

  • 04

    Hierarchical models and generating classes

  • 05

    Mutual, joint and conditional independence

  • 06

    Partial and marginal association and Simpson's paradox

  • 07

    Backward selection and the logistic equivalence

Worked example · free

Independence and the interaction term in a 2 by 2 table

Q [6 marks]. A 2 by 2 table has counts 40 and 60 in row 1 and 20 and 80 in row 2. Find the expected counts under independence, Pearson's statistic, and the saturated-model interaction term with first-level constraints. The marks shown are an AskSia practice allocation, not a published university marking scheme.
  • 2Row totals are 100 and 100 and column totals 60 and 140 out of 200, so the expected counts are 30 and 70 in each row.
  • 2X² = 100/30 + 100/70 + 100/30 + 100/70 = 9.52 on 1 df, above 3.84, so independence is rejected.
  • 1The sample odds ratio is 40 × 80 / (60 × 20) = 2.67.
  • 1With first-level terms set to zero, the single interaction term equals the log odds ratio, log 2.67 = 0.98.
Independence is rejected with X² = 9.52, and the saturated model's interaction term is 0.98, the log of the odds ratio 2.67. The weighting shown is an AskSia practice allocation only.
Sia tip — In a 2 by 2 table with corner constraints, read the interaction estimate straight off as a log odds ratio; it is the same number a logistic model would give.
Glossary

Key terms

Log-linear model
A Poisson model for the expected cell counts of a contingency table with main-effect and interaction terms.
Generating class
The list of highest-order terms in a hierarchical log-linear model, such as (AB, C).
Conditional independence
Independence of two factors within every level of a third factor, written (AC, BC).
Homogeneous association
A three-way model in which each pair of factors has the same odds ratio at every level of the third.
Simpson's paradox
A reversal of the direction of association between a marginal table and the partial tables that make it up.
FAQ

Log-linear Models for Multi-way Tables FAQ

Why can log-linear models always be fitted as Poisson GLMs?

Birch showed that Poisson, multinomial and product multinomial sampling give the same maximum likelihood estimates provided the model contains the terms for whatever totals were fixed by design. Fitting with a Poisson family therefore gives the correct estimates whichever scheme produced the table.

What does the hierarchical principle require?

If a model contains an interaction, it must also contain every lower-order term made from the same letters. A model with the AB term must include the A and B main effects, so a model can be named by its highest-order terms alone.

How does Simpson's paradox show up in a log-linear analysis?

The marginal table for two factors suggests one direction of association, but the partial tables at each level of a third factor show the opposite or none. In model terms, the third factor is associated with both of the others, so collapsing over it distorts their relationship.

How many models are there for a three-way table?

The lectures list nine hierarchical models: mutual independence, three versions of joint independence, three versions of conditional independence, homogeneous association and the saturated model. Each is named by its generating class, and each makes a different claim about which pairs of factors are associated.

Study strategy

Exam move

Start from two-way tables and check by hand that the interaction term equals the log odds ratio under corner constraints. Then memorise the nine three-way models with their generating classes and draw the association graph for each. Practise backward selection on a deviance table, such as the Berkeley admissions table in the worksheet, stating the null hypothesis and the degrees of freedom for each comparison.

Finally, translate one logistic model into its log-linear equivalent, remembering to include the margin of the explanatory factors. When describing a selected model, say in words which pairs of factors are associated, which are independent and given what, because that sentence is the conclusion a question usually asks for.

Working through Log-linear Models for Multi-way Tables in STAT6135? Sia is AskSia’s AI Statistics tutor — ask any STAT6135 Log-linear Models for Multi-way Tables question and get a clear, step-by-step explanation grounded in how STAT6135 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 8 of your subjects at University of Southampton, plus 1,000+ more Bibles across the AskSia library.
Sia - your STAT6135 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works