Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2026 Oct 27.
Published before final editing as: Am J Epidemiol. 2026 Oct 14:kwag256. doi: 10.1093/aje/kwag256

Those Confounded Examples

Stephen R Cole 1, Ashley I Naimi 2, Paul N Zivich 3, Jess K Edwards 4
PMCID: PMC13697337  NIHMSID: NIHMS2217813  PMID: 42869630

Confounding, a central concept in the field of epidemiology, is a distortion of the relationship between treatment and outcome, which occurs when there exists a common cause of both (1). Yet, real illustrative examples of meaningful confounding are surprisingly rare. To our knowledge, simple confounding examples have not been compiled together in the literature. Hypothetical examples abound and can be carefully crafted to illustrate fine points regarding confounding or other issues. But empirical examples emphasize that such methodological errors are more than technical fine points and can result in gross mistakes. Such examples should be readily available to stakeholders, including students in epidemiology.

The 4 examples provided here are gleaned from real study data, clearly demonstrate meaningful confounding in epidemiologic research, and may be used as teaching examples for the field. These examples are simple in the sense that the complex context surrounding each research question is shorn away, so that confounding can be exemplified, in the absence of measurement or selection biases, and without distractions of considering effect modification, generalizability, or model form assumptions. The confounding in these examples is simple in the sense that the treatments or exposures are time fixed (or treated as such), and therefore the confounding variables are themselves time fixed and measured at the study origin. In examples with follow up time, we ignore timing and treat the outcome as binary. In Examples 1 – 3, we estimate the risk ratio (RR) and account for confounding using standardization accomplished by g computation (2), with 95% compatible (or confidence) intervals (CI) (3) obtained using the sandwich variance (4). In Example 4, a logistic model is used to estimate the crude and adjusted odds ratio (OR) in a case-control study, and the 95% CI is obtained using the model variance. In each example, the structure of the confounding can be represented by the simple causal diagram A←W→Y, where A represents the treatment or exposure, W represents the confounder, and Y represents the outcome. SAS and R code to replicate results is provided at https://github.com/ainaimi/those-confounded-examples.

Example 1. Sarcoma Treatment and Recurrent Disease or Death

Investigators wanted to learn the effect of a new treatment, compared to standard care, on recurrent disease or death among sarcoma patients. 76 patients were classified as having ≥200 international units of serum lactic acid dehydrogenase (LDH; W=1) or not (W=0) before being treated with a new (A=1) or a standard (A=0) treatment and followed up to 7 years for recurrent disease or death (Y=1) (5). The crude RR was 0.67 (95% CI: 0.48, 0.95). Patients with lower LDH (W=0) were more likely to be given the new treatment but less likely to experience recurrent disease or death. After accounting for confounding by W the RR was 0.99 (95% CI: 0.71, 1.39). The crude and adjusted RRs are illustrated in Figure 1, and the data are provided in the column labeled N1 in Table 1.

Figure 1:

Figure 1:

Forest Plot of Crude and Adjusted Risk (or Odds) Ratios and 95% Confidence Intervals

Table 1:

Examples of Confounding

W A Y N1 N2 N3 N4
0 0 0 6 1421 6476 233
0 0 1 4 171 283 54
0 1 0 23 1238 5718 73
0 1 1 12 96 299 21
1 0 0 1 507 300 81
1 0 1 18 253 125 49
1 1 0 0 847 802 69
1 1 1 12 368 481 74
2 0 0 - - - 26
2 0 1 - - - 36
2 1 0 - - - 41
2 1 1 - - - 57

Example 2: Tamoxifen and Breast Cancer Recurrence

Investigators wanted to learn the effect of tamoxifen use on breast cancer recurrence among women who underwent surgery for breast cancer. 4901 women with breast cancer contributed data on tamoxifen use (A=1) or not (A=0) and breast cancer recurrence (Y=1), but were also classified as having lymph node metastasis (W=1) or not (W=0) at the time of surgery before tamoxifen use (6). The crude RR was 1.01 (95% CI: 0.90, 1.14). Women with lymph node metastasis (W=1) were more likely to be treated with tamoxifen and to experience cancer recurrence. After accounting for confounding by W the RR was 0.83 (95% CI: 0.74, 0.93). The crude and adjusted RRs are illustrated in Figure 1, and the data are provided in the column labeled N2 in Table 1.

Example 3: Fetal Monitoring and Caesarean Section

Investigators wanted to learn the effect of fetal monitoring on the risk of caesarean delivery among pregnant women. 14,484 pregnant women contributed data on fetal monitoring (A=1) or not (A=0) and caesarean section (Y=1), but also were classified as having arrested labor before monitoring (W=1) or not (W=0)(7). The crude RR was 1.88 (95% CI: 1.68, 2.11). Women with arrested labor (W=1) were more likely to be monitored and also more likely to undergo caesarean section (7). After accounting for confounding by W the RR was 1.21 (95% CI: 1.09, 1.36). The crude and adjusted RRs are illustrated in Figure 1, and the data are provided in the column labeled N3 in Table 1.

Example 4: Coffee and Myocardial Infarction

Investigators wanted to learn the effect of coffee consumption on myocardial infarction. Women aged 30 to 49 were investigated, including 291 cases (Y=1) of myocardial infarction and 523 controls (Y=0) classified as consuming 5+ (A=1) vs. 0–4 (A=0) cups of coffee per day recently, as well as history of cigarette smoking (i.e., W = 0 for never, former, or less than 15 cigarettes/day, W=1 for 15–34 cigarettes/day, and W=2 for 35+ cigarettes/day) (8). The crude OR was 2.03 (95% CI: 1.52, 2.72). Smokers (W>0) were more likely to be coffee drinkers and were also more likely to have myocardial infarctions. After accounting for confounding by W the OR was 1.38 (95% CI: 1.00, 1.89). The crude and adjusted ORs are illustrated in Figure 1, and the data are provided in the column labeled N4 in Table 1.

Conclusions

To summarize, in the first example, we see an apparent protective effect vanish after accounting for confounding. In the second example, we see a modest protective effect revealed only after accounting for confounding. In the third and fourth examples, we see an apparent harmful effect materially reduced upon accounting for confounding. A missing scenario is a case where a harmful effect is revealed only after accounting for confounding.

Confounding is often discussed in theoretical ways, or with contrived examples (e.g., ice cream sales as a cause of drowning). Providing multiple actual data examples with confounding working in various directions helps to concretize this abstract theoretical knowledge. These 4 examples are presented as empirical demonstrations of simple confounding, which with the given background provide insight into the nature of confounding. In all 4 examples, the context provided (e.g., temporality) allows us to decide that the variable is a confounder, the wider story makes intuitive sense, and therefore these 4 stories help to build basic intuition about confounding more generally. But, again for all 4 examples, the given context does not rule out additional confounders that we did not consider here. Therefore, the presented effect measures are teaching examples, rather than scientific results.

In one sense there is nothing special about confounding, it is simply a systematic error, and systematic errors can be cast as due to missing information (9). In another sense, confounding is special and central to answering causal questions because the possible bias due to confounding is large. In selection bias, the extent of bias is governed by the proportion of missing data. Confounding bias can be large because all the data are missing for all but one potential outcome. These 4 examples provide an entryway into deeper thinking about confounding and other systematic errors in epidemiology.

Acknowledgments:

We thank Anna Zolotor and Stephanie Kern-Allely for expert advice.

Funding:

SRC, PNZ, JKE were funded in part by NIH grant R01AI157758.

Footnotes

Conflict of Interest: None declared.

Contributor Information

Stephen R. Cole, Department of Epidemiology, Gillings School of Global Public Health, University of North Carolina, Chapel Hill

Ashley I. Naimi, Department of Epidemiology, School of Public Health, Emory University, Atlanta

Paul N. Zivich, Department of Epidemiology, Gillings School of Global Public Health, University of North Carolina, Chapel Hill

Jess K. Edwards, Department of Epidemiology, Gillings School of Global Public Health, University of North Carolina, Chapel Hill

Data Availability Statement:

Data are provided in Table 1.

References

  • 1.Greenland S, Morgenstern H. Confounding in health research. Annu Rev Public Health 2001;22:189–212. [DOI] [PubMed] [Google Scholar]
  • 2.Snowden JM, Rose S, Mortimer KM. Implementation of G-computation on a simulated data set: demonstration of a causal inference technique. Am J Epidemiol 2011;173(7):731–8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Cole SR, Edwards JK, Greenland S. Surprise! Am J Epidemiol 2021;190(2):191–3. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Ross RK, Zivich PN, Stringer JSA, et al. M-estimation for common epidemiological measures: introduction and applied examples. Int J Epidemiol 2024;53(2). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Makuch RW. Adjusted survival curve estimation using covariates. J Chronic Dis 1982;35:437–43. [DOI] [PubMed] [Google Scholar]
  • 6.Sato T, Matsuyama Y. Marginal structural models as a tool for standardization. Epidemiology 2003;14(6):680–6. [DOI] [PubMed] [Google Scholar]
  • 7.Greenland S, Neutra R. Control of confounding in the assessment of medical technology. Int J Epidemiol 1980;9(4):361–7. [DOI] [PubMed] [Google Scholar]
  • 8.Rosenberg L, Slone D, Shapiro S, et al. Coffee drinking and myocardial infarction in young women. Am J Epidemiol 1980;111(6):675–81. [DOI] [PubMed] [Google Scholar]
  • 9.Edwards JK, Cole SR, Westreich D. All your data are always missing: incorporating bias due to measurement error into the potential outcomes framework. Int J Epidemiol 2015;44(4):1452–9. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Data are provided in Table 1.

RESOURCES