Learn / Biostatistics / Analysing categorical data
Confounding, stratification and the Mantel-Haenszel estimate
14 minute read · 6-question quiz
What you will learn
Define a confounder and apply the three criteria
Stratify an association and compute the Mantel-Haenszel adjusted odds ratio
Recognise effect modification (interaction) and tell it apart from confounding
An association between exposure and outcome can be real (causal), the result of chance, bias, or confounding. Confounding is the most common reason a crude association is misleading.
A confounder is a variable that (1) is associated with the exposure, (2) is an independent cause or predictor of the outcome, and (3) is not on the causal pathway between exposure and outcome. Because it is mixed up with the exposure, it distorts the estimate.
The Mantel-Haenszel (MH) estimate
To combine stratum-specific tables into one adjusted summary, the MH odds ratio weights each stratum:
OR_MH = (Σ_i (a_i d_i / n_i))/(Σ_i (b_i c_i / n_i))
For the example: HIV-positive stratum (n = 250): a d/n = 60 × 35 / 250 = 8.4 and b c/n = 140 × 15/250 = 8.4. HIV-negative (n = 500): 5 × 380/500 = 3.8 and 95 × 20/500 = 3.8. OR_MH = (8.4 + 3.8)/(8.4 + 3.8) = 1.00, compared with the crude 3.28. A change of more than about 10 to 20% between the crude and adjusted estimate is a common rule of thumb for important confounding.
Dealing with confounders
| Stage | Method | Idea |
| Design | Randomisation | Balances known and unknown confounders on average |
| Design | Restriction | Study only HIV-negative people |
| Design | Matching | Select controls with the same age and sex as cases |
| Analysis | Stratification | Compare within levels of the confounder, then combine (Mantel-Haenszel) |
| Analysis | Multivariable regression | Adjust for many confounders at once (chapters 6 and 7) |
Randomisation is the only method that handles confounders you did not measure or even think of. In observational studies, residual confounding always remains.
Summary
A confounder is related to exposure and outcome and is not on the causal path.
Compare crude and adjusted estimates; a large change signals confounding.
Mantel-Haenszel combines stratum tables into a single adjusted OR (or RR).
If stratum effects genuinely differ, that is effect modification: report them separately.
Randomisation controls unmeasured confounders; observational studies cannot.
Check your understanding
Draft study guide. Spotted an error or something unclear? Tell us at hello@scintria.com. This is educational material, not clinical or regulatory advice.