13 Research methods, statistics, critical review and evidence-based practice13.2 Epidemiological studies

13.2.1.2 Confounding and its control

4 min read2 figures

Written by Resident Doctor Committee · Published

Try it

Simpson's paradox

Interactive

Overall, the new therapy looks worse: 33% responded against 39%.

Response rates everyone together. Everyone: new therapy 33%, standard care 39%.Everyone (660 patients)New therapy33%Standard care39%0%25%50%75%100%Percentage of the group
Responses with severity ignored
GroupNew therapyStandard careRisk ratioGot the new therapy
Everyone32.5% of 24039.3% of 4200.82736%
Crude risk ratio
0.827the therapy looks worse
Adjusted risk ratio
1.14Mantel-Haenszel, severity held still
Crude odds ratio
0.744
Adjusted odds ratio
1.24

The crude and adjusted ratios are on opposite sides of one, which is Simpson's paradox rather than ordinary confounding. Severity decided who got which treatment and also decided who responded, so the crude comparison answers a question nobody asked. The counts are invented to make the reversal exact.

Everyone together, the new therapy remits 32.5% against 39.3% on standard care. Split by severity and it does better in both groups, because 200 of the 220 severely ill patients received it.

Defining confounding

  • A confounder distorts an observed exposure-outcome association because it is linked to the exposure and to the outcome independently of the exposure. It does not lie on the causal pathway.

  • A spurious association is an apparent relationship that is not real. A confounder acting on both variables, or chance, produces it, and it disappears once the confounder is held constant.

  • A mediator lies on the causal pathway, so an indirect association through it is real. Antipsychotic weight gain leading to diabetes is an example, and adjusting for a mediator removes part of the total effect.

  • Population size does not confound a comparison of crude rates, because it is the denominator of each rate. Differences in age, sex, ethnic and socio-economic composition do confound it.

  • Confounding can create, mask, exaggerate or reverse an association.

  • Simpson's paradox is a reversal. Lithium augmentation can show higher remission in each severity stratum but lower crude remission when more lithium recipients have the harder-to-treat presentation.

A mediator lies on the causal pathway from exposure to outcome, whereas a confounder causes both exposure and outcome independently and creates an association with no causal arrow between them. Cmglee, CC BY-SA 4.0, via Wikimedia Commons

Confounding in observational comparisons

  • In an observational comparison the groups differ in other characteristics that independently affect the outcome, so confounding may produce the association.

  • A significant difference between matched cases and controls does not establish causation while confounders remain unmeasured and unadjusted.

  • Confounding by indication arises when prognosis shapes which drug a patient is given. It is the main threat to naturalistic registry-based comparisons of psychotropic drugs.

  • Comparing outcomes by observed adherence within a randomised trial reintroduces confounding. Patients choose adherence rather than being allocated to it, and motivation, insight and support may lower risk independently.

  • A matched, adjusted nested case-control study built on prospectively recorded data guards against recall, information, selection and attrition bias. It is observational, so unmeasured or residual confounding remains possible.

Reading crude and adjusted estimates

Crude and adjusted result

Interpretation

Crude significant, adjusted interval includes 1

The adjusted confounders explain the apparent effect

Adjusted interval still excludes 1

The exposure is more likely to be a genuine independent predictor

Small shift towards the null, adjusted estimate still well away from 1

The measured confounders explain only part of the association

Compare each crude estimate with its adjusted one: the schizophrenia excess shrinks but its interval still excludes 1, while the mood disorder interval crosses 1 once confounders are controlled (illustrative data). Drawn for the MRCPsychiatrist statistics course
  • Significance depends on the covariates in the model. An exposure can survive adjustment for pre-specified confounders yet lose significance once correlated co-exposures are added.

  • Residual confounding can remain after adjustment from unmeasured factors, coarse categories, measurement error or wrong timing, so adjustment does not prove that confounding is absent.

Effect modification

  • An effect modifier is a third variable across whose levels the strength of an association genuinely differs, so the stratum-specific estimates differ from each other.

  • Confounding shows as a crude estimate that differs from the adjusted estimate.

  • Stratified analysis can show both: confounding when the pooled stratum estimate differs from the crude, and effect modification when the stratum estimates differ from each other.

Confounding is a distortion to remove, whereas effect modification is a real finding to report.

Controlling confounding

Design-stage methods act before data collection. Analysis-stage methods need the collected data.

Stage

Method

How it works

Design

Randomisation

Balances confounders between groups rather than eliminating them

Design

Restriction

Enrols only people at one level of a suspected confounder, removing its variation from the sample

Design

Matching

Selects comparable participants, such as cases and controls of similar age and sex

Analysis

Stratification

Compares exposure groups within each level of the confounder

Analysis

Multivariable adjustment

Regression or analysis of covariance (ANCOVA) adjusts for several measured variables at once

Analysis

Standardisation

Compares rates using a shared population distribution, usually of age

  • Randomisation works because a confounder distorts the estimate only when it is unevenly distributed between the groups compared.

  • Balance after randomisation holds on average, so chance baseline imbalance can occur, especially in small trials.

  • Matched data need a matched analysis, such as conditional logistic regression for matched case-control data.

  • The Mantel-Haenszel method calculates an odds ratio within each stratum of the confounder and pools them into one weighted, adjusted summary odds ratio.

  • Stratification fails when there are many confounders, because the strata become numerous and sparse.

Methods that do not control confounding

Method

What it does instead

Blinding

Reduces observer and recall bias; blinded outcome raters guard against observer bias

Enlarging the sample

Reduces random error only

Agreement and reliability statistics

Measure repeatability

Meta-analytic pooling model

Handles between-study heterogeneity