Skip to content
Scintria
ToolsGrant writerFunding
HomeLiteratureClinical trialsEvidence LabProtocol packData analysisLearnProjectsLibraryReferencesApplications
Start free
ScintriaStart free

Learn / Biostatistics / Analysing categorical data

Confounding, stratification and the Mantel-Haenszel estimate

14 minute read · 6-question quiz

Download this lesson as a colour Word or PDF study guide with the figures and answers. Included in paid plans; reading and quizzes stay free.Sign in

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.

Apparent associationConfounderHIV infectionExposureCharcoal cookingOutcomeTuberculosis
HIV is related to both the household's exposure and to TB. Ignore it, and charcoal cooking looks harmful even if it is not.

Worked example: an association that disappears

A survey of 750 adults records whether they live in a household that cooks with charcoal and whether they have TB. Overall (crude):

TBNo TB
Charcoal65235
Other fuel35415

Crude OR = (65 × 415)/(235 × 35) = 3.28. Risk 21.7% against 7.8%.

Now split by HIV status.

StratumExposed: TB / totalUnexposed: TB / totalStratum OR
HIV positive60 / 200 (30%)15 / 50 (30%)1.00
HIV negative5 / 100 (5%)20 / 400 (5%)1.00

Within each HIV group, charcoal makes no difference whatsoever. The crude association arose because HIV-positive people were far more likely to be in the charcoal group (200 of 300 exposed against 50 of 450 unexposed) and have much higher TB risk. This is confounding, and here it explains the entire crude association.

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.

StudyEstimate (95% CI)Crude (ignoring HIV)3.28 (2.11–5.1)HIV-positive stratum1 (0.51–1.97)HIV-negative stratum1 (0.37–2.73)Mantel-Haenszel adjusted1 (0.57–1.75)0.51245Odds ratio (log scale)
Adjusting removes the spurious association. (Mantel-Haenszel interval by the Robins-Breslow-Greenland method.)

Dealing with confounders

StageMethodIdea
DesignRandomisationBalances known and unknown confounders on average
DesignRestrictionStudy only HIV-negative people
DesignMatchingSelect controls with the same age and sex as cases
AnalysisStratificationCompare within levels of the confounder, then combine (Mantel-Haenszel)
AnalysisMultivariable regressionAdjust 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.

Effect modification is different

If the stratum-specific ORs differ meaningfully (say 1.1 in women and 4.5 in men), the exposure's effect truly varies by sex. This is effect modification or interaction. It is a finding to report, not a nuisance to adjust away: give the stratum-specific estimates rather than one pooled figure.

Do not adjust for a mediator or a collider

Adjusting for a variable that lies on the causal pathway (for example, adjusting for blood pressure when studying whether salt causes stroke through blood pressure) removes the effect you want to measure. Adjusting for a common effect of exposure and outcome (a collider, e.g. hospital admission) can create a spurious association. Draw the causal diagram before choosing adjustment variables.

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

Question 1
1

Which is NOT a requirement for a confounder?

Question 2
2

Crude OR is 3.3 but the MH OR adjusted for age is 1.1. This indicates:

Question 3
3

Stratum ORs are 0.9 in men and 4.8 in women. This suggests:

Question 4
4

Which design feature best controls unmeasured confounders?

Question 5
5

Adjusting for a variable that lies on the causal pathway will usually:

Question 6
6

Restriction as a way of controlling confounding means:

Draft study guide. Spotted an error or something unclear? Tell us at hello@scintria.com. This is educational material, not clinical or regulatory advice.

Chi-square and Fisher's exact testsCorrelation: strength of a straight-line relationship