Categorical › Contingency / proportions

Log-linear regression (2–3 factors)

Log-linear regression fits a Poisson model to the contingency table of two or three categorical variables, with likelihood-ratio tests for association and interaction.

What is Log-linear regression (2–3 factors)?

Log-linear models treat cell counts as Poisson and model log-expected counts with main effects and interactions. The saturated model reproduces the table exactly; dropping a term tests whether that association is needed (G² likelihood-ratio test).

For a 2-way table the interaction LRT is the classical test of independence; with 3 variables the drop1 table separates each 2-way (and the 3-way) association.

When should I use Log-linear regression (2–3 factors)?

  • Multi-way categorical association structure (which pairs of factors are associated, and is there a 3-way interaction?).
  • Modeling contingency tables beyond simple 2-way chi-square.

What data does it need?

2–3 categorical columns.

What does it report?

Overall independence G² test, drop1 LRT per highest-order term, saturated-model coefficients, AIC comparison.

What does it assume?

  • Independent observations.
  • Adequate cell counts for the asymptotic G² tests.

How do I interpret the result?

A significant term's association is required to describe the table. Compare AICs to judge whether the saturated model earns its complexity.

See also

References

  • Agresti (2013). Categorical Data Analysis, 3rd ed., ch. 9.