An association changes after you separate participants by age. Did you uncover bias, or a meaningful difference between subgroups? Understanding effect modification vs confounding tells you whether to adjust your estimate or report separate effects.
This guide explains the criteria, stratified analysis, and reporting decisions, using a fully fictional worked example.
Why the Distinction Matters
Both concepts involve a third variable, but they answer different questions. Confounding distorts an association. Effect modification means the effect genuinely differs across groups, on a specified scale.
A classic clinical illustration is confounding by indication: if sicker patients are more likely to receive a treatment, the treated and untreated groups differ in prognosis before treatment begins, and a naive comparison mixes the treatment's effect with the effect of being sicker.
Start with the causal question
Define the exposure, outcome, target population, and causal contrast before choosing adjustment variables. Use the literature, subject-matter knowledge, and a causal diagram, not statistical significance alone, to decide what belongs in the model.
What Is Confounding?
Confounding mixes an exposure's effect with the influence of another factor on the outcome. It can create an apparent association, hide a real one, or even reverse its direction.
The three criteria for a confounder
The traditional screening criteria are that the variable is:
- Associated with the exposure in the source population.
- Associated with the outcome independently of the exposure, as a risk or prognostic factor.
- Not caused by the exposure, so it does not lie on the causal pathway between exposure and outcome.
Smoking, for example, can confound an association between coffee drinking and heart disease, because smokers drink more coffee and smoking independently raises cardiovascular risk.
What does not automatically count as confounding
Neither a significant p-value nor a changed coefficient proves confounding. Adjusting for a mediator (a variable on the causal pathway) can block part of the effect you want to measure, and adjusting for a collider can introduce selection bias. Poor measurement, overly broad categories, and omitted variables can also leave residual confounding after adjustment.
What Is Effect Modification?
Effect modification occurs when the effect of an exposure differs across levels of another variable. It is often called interaction. It is not a bias to be removed; it is a finding to be described. An effect modifier does not need to meet the confounder criteria.
Recognizing an interaction
Compare the same measure across strata: risk ratios, risk differences, odds ratios, or rate ratios. Whether you see interaction depends on the scale. Additive (risk difference) and multiplicative (ratio) interaction need not agree, as the worked example below shows. An interaction-term p-value informs interpretation, but it neither proves practical importance nor proves that subgroup differences are absent.
An example of an effect modifier
Imagine, hypothetically, a treatment that greatly reduces heart attack risk in people with severe disease but has little effect in people with mild disease. Disease severity modifies the treatment's benefit, so you would report separate estimates for mild and severe disease rather than implying equal benefit for everyone.
Confounding and Effect Modification Side by Side
| Confounding | Effect modification | |
|---|---|---|
| Question it answers | Is the crude association distorted? | Does the effect differ between groups? |
| Is it a bias? | Yes | No, it is a real feature of the effect |
| Stratum-specific estimates | Similar to each other, different from crude | Meaningfully different from each other |
| What to do | Control it (adjust, stratify, restrict, match) | Describe it (report each stratum) |
Can one variable be both?
Yes. Disease severity could influence who receives a treatment and the prognosis (a confounder) while also changing how much the treatment helps (an effect modifier). Then you need both appropriate confounding control and subgroup reporting. Remember that differing subgroup estimates can also come from chance, selection bias, or residual confounding, so interpret them with care.
Use Stratified Analysis to Tell Them Apart
Stratification is a transparent first step before multivariable modeling. Keep the effect measure the same throughout.
- Calculate the crude estimate from the overall exposure-by-outcome 2x2 table. Treat it as provisional.
- Calculate stratum-specific estimates within each level of the third variable, judging differences by precision, sample size, prior knowledge, and public health relevance.
- Compare crude, stratum-specific, and adjusted estimates. Stratum estimates that are similar to each other but different from the crude estimate suggest confounding, if causal reasoning supports it. Stratum estimates that differ meaningfully from each other suggest effect modification.
If there is no important modification, a Mantel-Haenszel or regression-adjusted summary estimate is reasonable. The "10 percent change in estimate" rule is only a screening convention; odds ratios can also change after adjustment because of noncollapsibility, even without confounding.
Worked Example (All Numbers Fictional)
Does taking part in a prevention program lower illness risk, and does age change that association?
Crude results
| Hypothetical group | Ill | Not ill | Total |
|---|---|---|---|
| Participants | 30 | 270 | 300 |
| Nonparticipants | 60 | 240 | 300 |
Participant risk is 30/300 = 10%; nonparticipant risk is 60/300 = 20%. The crude risk ratio is 0.50.
Age-stratified results
| Hypothetical age group | Participant risk | Nonparticipant risk | Risk ratio | Risk difference |
|---|---|---|---|---|
| Younger | 10/200 = 5% | 20/200 = 10% | 0.50 | -5 percentage points |
| Older | 20/100 = 20% | 40/100 = 40% | 0.50 | -20 percentage points |
Interpreting the example
The crude and age-specific risk ratios are identical, so age is neither a confounder nor an effect modifier on the ratio scale. (Age is distributed the same way in both groups, 200 younger and 100 older, so it cannot confound here.) On the additive scale, however, the program prevents 5 cases per 100 younger people but 20 per 100 older people: clear effect modification by risk difference, and an important finding for deciding where to offer the program.
For contrast, in a different hypothetical dataset, age-specific ratios near 0.50 with a crude ratio of 0.70 would point to confounding by age. Age-specific ratios of 0.80 and 0.30 would point to effect modification that requires subgroup reporting.
How to Handle Each Finding
When confounding is present
Options include restriction, matching, stratification, standardization, and multivariable adjustment. Randomization addresses confounding through treatment assignment on average, although chance imbalances remain possible. Present crude and adjusted estimates when the comparison helps readers see the distortion, and remember that adjustment cannot remove unmeasured confounding.
When effect modification is present
Report subgroup estimates with confidence intervals and explain what they mean in practice. If you use a regression interaction term, state its scale. Avoid presenting one pooled estimate as if it applied equally to every group; if you do report a population-average effect, name the population and show the subgroup results alongside it.
Common Mistakes to Avoid
- Calling every third variable a confounder without causal justification.
- Choosing adjustment variables by statistical significance alone.
- Treating effect modification as something to "adjust away."
- Using the 10 percent change rule as a causal rule.
- Ignoring the difference between additive and multiplicative scales.
- Overinterpreting sparse or unstable subgroup estimates, especially unplanned ones.
Frequently Asked Questions
What is an example of an effect modifier?
Age modifies a treatment's effect when younger and older participants have meaningfully different effect estimates on a stated scale. Report the age-specific estimates with confidence intervals.
Can a confounder also be an effect modifier?
Yes. One variable can both distort a crude estimate and identify groups with different effects. Use causal reasoning, stratum-specific estimates, and appropriate adjustment to address both roles.
What is effect modification in research?
It is a difference in the exposure-outcome effect across levels of another variable, on a specified scale. It is often called interaction, and it is not a source of bias.
Key Takeaways
The core distinction is distortion versus heterogeneity. Confounding calls for control when causal reasoning supports adjustment; effect modification calls for clear reporting of differences on a stated scale. Read crude, stratum-specific, and adjusted estimates together, and do not let a significance test replace a causal explanation.
For structured practice with these ideas, the free Principles of Epidemiology course covers confounding, effect modification, and causal inference in 20 lessons with 200 quiz questions. To plan the sample size for a stratified analysis, try the power analysis tool.
Written by Angel Reyes, DrPH (c), PMP, PMI-ACP, MPH, MCHES, founder of Subthesis.