[Durgical](https://durgical.com/en/) › [DurgiPedia](https://durgical.com/en/durgipedia/) › [Epidemiology](https://durgical.com/en/epidemiology/) › [Bias, confounding and causation](https://durgical.com/en/epidemiology/areas/bias/) › Controlling confounding

# Controlling confounding

- Concept

Confounding can be prevented when designing a study (chance, restriction, matching) or corrected when analysing it (strata and models).

Updated Nov 5, 2026

## Key points

- Design: randomisation, restriction and matching.
- Analysis: stratification, Mantel-Haenszel, standardisation and multivariable regression.
- Only randomisation also controls unknown confounders.
- Mantel-Haenszel combines strata into an adjusted summary measure, when the effect is similar across strata.
- Restriction prevents study of the restricted factor and limits generalisability.
- Matching in a case-control study requires a matched analysis.

## What it is

Confounding is controlled at two moments. At design, with randomisation (balances known and unknown factors), restriction (including only one level of the confounder) and matching (pairing exposed and unexposed, or cases and controls, on the confounder). In the analysis, with stratification, the Mantel-Haenszel method, which combines strata into one adjusted measure, and multivariable models such as logistic regression. Only what was measured, and measured well, can be adjusted for.

## Worked example

- Case-control study of diabetes (cases) and a sedentary lifestyle (exposure), stratified by obesity.
- Obese: a = 60, b = 40, c = 30, d = 40 (n = 170). Not obese: a = 20, b = 80, c = 20, d = 160 (n = 280).
- Crude OR (strata added: a = 80, b = 120, c = 50, d = 200) = (80 × 200) / (120 × 50) = 16 000 / 6 000 ≈ 2.7.
- Stratum ORs: obese (60 × 40) / (40 × 30) = 2.0; not obese (20 × 160) / (80 × 20) = 2.0.
- Mantel-Haenszel: numerator = 60 × 40 / 170 + 20 × 160 / 280 ≈ 14.1 + 11.4 = 25.5.
- Denominator = 40 × 30 / 170 + 80 × 20 / 280 ≈ 7.1 + 5.7 = 12.8. MH OR ≈ 25.5 / 12.8 ≈ 2.0.
- Reading: the crude OR of 2.7 was inflated by obesity; the adjusted OR is 2.0.

## Methods for controlling confounding

| Method | Stage | How it works | Limitation |
| --- | --- | --- | --- |
| Randomisation | Design | Chance spreads confounders evenly | Only in experimental studies |
| Restriction | Design | Only one level of the confounder is included (for example, non-smokers only) | Less generalisable; that factor cannot be studied |
| Matching | Design | Groups are paired on the confounder | Needs a matched analysis; risk of overmatching |
| Stratification and Mantel-Haenszel | Analysis | Compare within each stratum and combine | Few confounders at a time |
| Multivariable regression | Analysis | Adjusts for several confounders at once | Relies on model assumptions; residual confounding |

## Markers

- MH
- Adjusted OR
- Strata

## In practice

- In an observational paper, check which variables were adjusted for and whether an important confounder is missing.
- Age standardisation of rates is a way to control confounding by age when comparing populations.

## Common pitfalls

- Pooling strata with Mantel-Haenszel when the stratum ORs are very different: that is effect modification and is reported by stratum.
- Adjusting for everything available, including intermediate variables or consequences of the outcome.

## Memory aid

Design has its RRM (Randomise, Restrict, Match); analysis has its SMM (Stratify, Mantel-Haenszel, Multivariable models).

## Test yourself

Think of the answer, then tap the question to see it.

## Which method controls confounding by unknown factors?

Randomisation, because it spreads both measured and unmeasured factors between groups by chance.

## What does the Mantel-Haenszel method do?

It combines the measures of association from several strata into one summary measure adjusted for the stratifying variable.

## Crude OR 2.7 and OR 2.0 and 2.0 in each stratum. What does this show?

That the stratifying variable was a confounder inflating the crude association; the adjusted measure is 2.0.

## What is the drawback of restriction?

It limits generalisability and the effect of the restricted factor cannot be studied.

[Add to my cards (4)](https://durgical.app/estudiar/?add=/en/epidemiology/controlling-confounding/)

## Connections

## Related 5

- [Confounding](https://durgical.com/en/epidemiology/confounding/)
- [Effect modification (interaction)](https://durgical.com/en/epidemiology/effect-modification/)
- [Randomised controlled trial](https://durgical.com/en/epidemiology/randomised-controlled-trial/)
- [Logistic regression](https://durgical.com/en/epidemiology/logistic-regression/)
- [Standardisation of rates](https://durgical.com/en/epidemiology/standardisation-of-rates/)

[← All of epidemiology](https://durgical.com/en/epidemiology/)

Educational content on epidemiological and statistical methods; the examples use made-up numbers to teach the calculation. Not a clinical or legal guide: current Colombian rules are in the official sources.

Sources: [Chapter 25: Assessing risk of bias in a non-randomized study](https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/chapter-25) (Cochrane, 2024); [Chapter 10: Analysing data and undertaking meta-analyses](https://www.cochrane.org/authors/handbooks-and-manuals/handbook/current/chapter-10) (Cochrane, 2024); [Confounding | Catalog of Bias](https://catalogofbias.org/biases/confounding/) (Catalogue of Bias Collaboration, 2018).

## **Spotted a mistake?** We are always improving for the community. Tell us what is wrong and our team will review it. Report a mistake

Representative model, for educational purposes only.

---
Source: https://durgical.com/en/epidemiology/controlling-confounding/
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite as: DurgiPedia (durgical.com), https://durgical.com/en/epidemiology/controlling-confounding/
