ArticleslgStudy

science

Log-linear analysis

Log-linear analysis is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Log-linear analysis rather than just read about it. In short: Log-linear analysis is a technique used in statistics to examine the relationship between more than two categorical variables. The technique is used for both hypothesis testing and model building.

Key takeaways

  • Log-linear analysis belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Log-linear analysis to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Log-linear analysis from memory before moving on to harder problems.

Reference excerpt

Log-linear analysis is a technique used in statistics to examine the relationship between more than two categorical variables. The technique is used for both hypothesis testing and model building. In both these uses, models are tested to find the most parsimonious (i.e., least complex) model that best accounts for the variance in the observed frequencies. (A Pearson's chi-square test could be used instead of log-linear analysis, but that technique only allows for two of the variables to be compared at a time.)

Fitting criterion Log-linear analysis uses a likelihood ratio statistic X 2 {\displaystyle \mathrm {X} ^{2}} that has an approximate chi-square distribution when the sample size is large:

X 2 = 2 ∑ O i j ln ⁡ O i j E i j , {\displaystyle \mathrm {X} ^{2}=2\sum O_{ij}\ln {\frac {O_{ij}}{E_{ij}}},}

where

ln = {\displaystyle \ln =} natural logarithm;

O i j = {\displaystyle O_{ij}=} observed frequency in cellij (i = row and j = column);

E i j = {\displaystyle E_{ij}=} expected frequency in cellij.

X 2 = {\displaystyle \mathrm {X} ^{2}=} the deviance for the model.

Assumptions There are three assumptions in log-linear analysis: 1. The observations are independent and random; 2. Observed frequencies are normally distributed about expected frequencies over repeated samples. This is a good approximation if both (a) the expected frequencies are greater than or equal to 5 for 80% or more of the categories and (b) all expected frequencies are greater than 1. Violations to this assumption result in a large reduction in power. Suggested solutions to this violation are: delete a variable, combine levels of one variable (e.g., put males and females together), or collect more data. 3. The logarithm of the expected value of the response variable is a linear combination of the explanatory variables. This assumption is so fundamental that it is rarely mentioned, but like most linearity assumptions, it is rarely exact and often simply made to obtain a tractable model. Additionally, data should always be categorical. Continuous data can first be converted to categorical data, with some loss of information. With both continuous and categorical data, it would be best to use logistic regression. (Any data that is analysed with log-linear analysis can also be analysed with logistic regression. The technique chosen depends on the research questions.)

Variables In log-linear analysis there is no clear distinction between what variables are the independent or dependent variables. The variables are treated the same. However, often the theoretical background of the variables will lead the variables to be interpreted as either the independent or dependent variables.

Models The goal of log-linear analysis is to determine which model components are necessary to retain in order to best account for the data. Model components are the number of main effects and interactions in the model. For example, if we examine the relationship between three variables—variable A, variable B, and variable C—there are seven model components in the saturated model. The three main effects (A, B, C), the three two-way interactions (AB, AC, BC), and the one three-way interaction (ABC) gives the seven model components. The log-linear models can be thought of to be on a continuum with the two extremes being the simplest model and the saturated model. The simplest model is the model where all the expected frequencies are equal. This is true when the variables are not related. The saturated model is the model that includes all the model components. This model will always explain the data the best, but it is the least parsimonious as everything is included. In this model, observed frequencies equal expected frequencies, therefore in the likelihood ratio chi-square statistic, the ratio O i j E i j = 1 {\displaystyle {\frac {O_{ij}}{E_{ij}}}=1} and ln ⁡ ( 1 ) = 0 {\displaystyle \ln(1)=0} . This results in the likelihood ratio chi-square statistic being equal to 0, which is the best model fit. Other possible models are the conditional equiprobability model and the mutual dependence model. Each log-linear model can be represented as a log-linear equation. For example, with the three variables (A, B, C) the saturated model has the following log-linear equation:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Log-linear analysis

Start with the simplest possible case. Write down what Log-linear analysis claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Log-linear analysis before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Log-linear analysis ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Log-linear analysis

In research
Log-linear analysis appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Log-linear analysis in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Log-linear analysis is common in secondary-school and first-year university syllabi. It links to neighbouring topics Categorical variable interactions, so understanding it makes those chapters shorter.
In everyday life
Look for Log-linear analysis outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Log-linear analysis in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Log-linear analysis means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Log-linear analysis out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Log-linear analysis in simple terms?

Log-linear analysis is a technique used in statistics to examine the relationship between more than two categorical variables. The technique is used for both hypothesis testing and model building.

Why does Log-linear analysis matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Log-linear analysis?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Log-linear analysis.

Tags

  • Categorical variable interactions

Keep exploring