SPPH 604 · Application of Advanced Epidemiological Methods
Among adults with MASLD, people with obesity died less often than people without it: 7.9% vs 13.0%. The hazard ratio (HR) for death, obese vs not obese:
| What the model adjusts for | HR (95% CI) |
|---|---|
| Nothing (crude) | 0.67 (0.56–0.81) |
| Age and sex | 0.91 (0.75–1.09) |
| The paper’s Model 1: age, sex + diabetes, hypertension, cholesterol, kidney disease, heart attack, cancer, medicines | 0.77 (0.64–0.93) |
| The paper’s Model 2: Model 1 + smoking, sedentary time | 0.80 (0.66–0.97) |
Same 5,911 people in every row. HR < 1 = a lower death rate with obesity.
Simplified for today. The paper crosses BMI with waist size to make four groups. We use BMI alone, which the paper does not report — today’s numbers are our own reproduction.
Read more · Kueh et al., BMJ Open 2026 · EpiMethods Notation and glossary · our code: lectures/analysis/Week4_bmi_exposure.R
Read more · EpiMethods Concepts, “Causal roles”: ehsanx.github.io/EpiMethods/confounding0.html
EpiMethods Concepts: “The Epistemological Divide” · “The Counterfactual Framework”
Predicting: “Which adults with MASLD are most likely to die?”
Anything that tracks death helps — including diabetes caused by obesity.
Explaining: “Would they live longer if they were not obese?”
Adjusting for diabetes caused by obesity hides part of the effect we want.
Same R code (+ diabetes), opposite rules. The paper uses causal words (“confers the poorest survival”) but adjusts like a prediction model — for diabetes, kidney disease and heart attack, which obesity may itself cause.
Read more · EpiMethods Concepts, “The Epistemological Divide: Explanatory versus Predictive Modeling”
| Person | Obese? | Y(1): if obese | Y(0): if not obese |
|---|---|---|---|
| Ana | yes | died | ? |
| Ben | no | ? | alive |
Our hope is conditional exchangeability: comparable within levels of L (same age, sex …). It cannot be tested — a DAG writes down why we believe it.
Read more · EpiMethods Concepts, “The Counterfactual Framework” · video · Hernán & Robins, What If, ch. 1–2 (free online)
Positivity ✓ holds (thin for young women). Consistency ✗ is doubtful: “obesity” is not one well-defined thing we could change.
Read more · Hernán & Robins, What If, ch. 3: “Consistency: first, define the counterfactual outcome” · Hernán & Taubman, Int J Obes 2008
EpiMethods Concepts: “Structural and Knowledge-Based Selection Techniques”
Goal: block every back door, keep the causal paths open, open nothing new — here, adjust for age. dagitty.net finds the adjustment sets for you.
A collider (two arrows collide into it) blocks its path on its own. Adjusting for it — or for something it causes — opens the path.
Read more · EpiMethods Concepts, “The Three Elementary Causal Structures” · tutorials: confounding, mediator, collider
FLI rises with BMI and with triglycerides (TG). Keep only FLI ≥ 60, and people with a low BMI stay in only if their TG is high: ρ = +0.28 among everyone, −0.30 among the selected.
People without obesity reach FLI ≥ 60 with higher TG (174 vs 126 mg/dL) and GGT (36 vs 25 U/L). If these raise the risk of death, obesity looks protective — index-event bias. The birth-weight paradox (left) is the classic case.
Describing ✓ people with obesity died less often here. Causal ✗ “obesity protects” is not supported.
Serious illness (unmeasured) causes weight loss and death — reverse causation. “Has diabetes” is recorded once, so it mixes disease before obesity (a confounder) with disease caused by it (a mediator). dagitty: no set of the variables we measured is valid.
| Step | HR | What was added | What the DAG predicts |
|---|---|---|---|
| Crude | 0.67 | — | confounded |
| + age, sex | 0.91 | confounders | closing back doors → toward 1 ✓ |
| Model 1 | 0.77 | the recorded conditions | partly mediators → away from 1 ✓ |
| Model 2 | 0.80 | + smoking, sedentary time | smokers are leaner and die more: a confounder → toward 1 ✓ |
| Pre-exposure only | 0.95 (0.78–1.14) | age, sex, race/ethnicity, smoking, sedentary time | the closest measured set to the DAG’s |
Every move goes the way the DAG predicts — support, not proof.
Read more · EpiMethods Z-bias tutorial · VanderWeele, “Principles of confounder selection”, Eur J Epidemiol 2019
| Rule | Adjust for | Catch |
|---|---|---|
| Pre-treatment | everything measured before the exposure | may include instruments and M-bias variables |
| Common cause | only causes of both | too strict — drops real confounders |
| Disjunctive cause | pre-exposure causes of the exposure or the outcome | you only need to know one arrow |
| Modified disjunctive cause | the same, minus instruments, plus proxies | a practical default ✓ |
Every rule needs time order, and one NHANES visit can’t tell whether diabetes came before obesity.
Read more · EpiMethods Concepts, “Empirical Criteria for DAG-Deficient Scenarios” · video · VanderWeele & Shpitser, Biometrics 2011
EpiMethods Concepts: “Modelling criteria for variable selection”
| Obese | Not obese | p-value | SMD | |
|---|---|---|---|---|
| Number of people | 4,620 | 1,291 | ||
| Died, n (%) | 366 (7.9%) | 168 (13.0%) | <0.001 | 0.17 |
| Age, mean (SD) | 50.5 (16.1) | 54.6 (15.5) | <0.001 | 0.26 |
| Women | 52.6% | 27.7% | <0.001 | 0.52 |
| Current smokers | 18.0% | 24.7% | <0.001 | 0.16 |
| Type 2 diabetes | 26.2% | 20.9% | <0.001 | 0.13 |
The rule: add a variable; keep it if the exposure’s estimate changes by more than 10%.
An estimate can move because confounding was removed, or part of the effect was removed (mediators), or bias was added (colliders), or because ORs and HRs move with no confounding at all (after the next part). The rule can’t tell which.
Choose confounders from knowledge — a DAG and the rules of thumb — not from the data.
Read more · EpiMethods Concepts, “Statistical Significance (Stepwise Selection)”, “Purposeful Selection of Covariates”, “Machine Learning (ML)” · Heinze, Wallisch & Dunkler, Biom J 2018
EpiMethods Concepts: “Collapsibility and the Choice of Effect Measure”
Made-up numbers. Half of each age group is exposed, so age is not a confounder. OR = odds ratio · RR = risk ratio · RD = risk difference.
| Age group (people) | Risk, exposed | Risk, unexposed | OR | RR | RD |
|---|---|---|---|---|---|
| 60 or older (200) | 0.80 | 0.50 | 4.00 | 1.60 | 0.30 |
| Under 60 (200) | 0.50 | 0.20 | 4.00 | 2.50 | 0.30 |
| Everyone (400) | 0.65 | 0.35 | 3.45 | 1.86 | 0.30 |
Read more · EpiMethods collapsibility tutorial · Naimi & Whitcomb, Am J Epidemiol 2020
Here the marginal OR equals the crude OR only because age is not a confounder. With confounding, the marginal effect is the standardised one (next slide) — not the crude.
Read more · EpiMethods collapsibility tutorial · Hernán, “The hazards of hazard ratios”, Epidemiology 2010
# fit = glm(died ~ obese + age + female + ..., family = binomial, data = d)
d1 <- transform(d, obese = 1); d0 <- transform(d, obese = 0)
p1 <- mean(predict(fit, newdata = d1, type = "response"))
p0 <- mean(predict(fit, newdata = d0, type = "response"))
c(RD = p1 - p0, RR = p1 / p0, OR = (p1 / (1 - p1)) / (p0 / (1 - p0)))One logistic model gives the marginal RD, RR and OR together. For survival, the same idea gives a standardised survival curve: everyone obese vs no one obese.
Read more · EpiMethods collapsibility tutorial, “Marginal RD, RR and OR” · Snowden, Rose & Mortimer, Am J Epidemiol 2011 · Naimi & Whitcomb, Am J Epidemiol 2020
EpiMethods Concepts: “The Table 2 Fallacy”
One Cox model, as a paper’s Table 2 would print it:
| In one model: obesity + high waist fat + age + sex + diabetes | HR (95% CI) |
|---|---|
| Obese | 0.80 (0.65–0.99) |
| High waist fat (WHtR ≥ 0.6) | 1.17 (0.87–1.57) |
| Age, per 10 years | 2.30 (2.12–2.49) |
| Type 2 diabetes | 1.65 (1.39–1.97) |
Table 2 fallacy = reading every row as that variable’s own effect. Each row answers a different question — and each question needs its own DAG and adjustment set.
Read more · EpiMethods Concepts, “Why A Single Model Fails” · video · Westreich & Greenland, Am J Epidemiol 2013
Same DAG, different question — different roles. Waist fat is a mediator in Q1 but the exposure in Q2; obesity is the exposure in Q1 but a confounder in Q2.
Age needs no adjustment — nothing causes it. Diabetes needs a variable nobody measured (genetic risk), so no model in our data answers Q4.
| Question | Its own DAG says adjust for | Its own model | The one model’s row |
|---|---|---|---|
| Q1 · obesity | age (+ sex, race/ethnicity, smoking, activity) | 0.95 (0.78–1.14) | 0.80 (0.65–0.99) |
| Q2 · high waist fat | age, obesity (+ the same) | 1.24 (0.93–1.67) | 1.17 (0.87–1.57) |
| Q3 · age, per 10 years | nothing | 2.38 (2.21–2.56) | 2.30 (2.12–2.49) |
| Q4 · diabetes | age, obesity, waist + genetic risk (unmeasured) | 1.71 (1.43–2.04)* | 1.65 (1.39–1.97) |
Rule: one exposure, one model, one row reported — covariates in a footnote. * Still confounded: genetic risk is not measured.
Next: Week 5 — the paper’s four BMI × waist groups (effect modification). Exit question: the one arrow in your own paper’s DAG you are least sure of?
| Topic | EpiMethods | Key reading |
|---|---|---|
| Notation, positivity, consistency | Notation and glossary | Hernán & Robins, What If (free) |
| Potential outcomes | Concepts — Counterfactual Framework · video | Hernán & Robins, What If, ch. 1 |
| DAGs | Concepts — Grammar of causal diagrams · videos 1 2 3 | Greenland et al. 1999; Tennant et al. 2021 |
| Roles, by simulation | tutorials 1 2 3 3b 4 | — |
| Rules of thumb | Concepts — Empirical Criteria · video | VanderWeele 2019 |
| Data-driven selection | Concepts — Modelling criteria · tutorial | Heinze et al. 2018 |
| Collapsibility, standardisation | tutorial · marginal RD/RR/OR | Naimi & Whitcomb 2020 |
| Table 2 fallacy | Concepts — Why a single model fails · video | Westreich & Greenland 2013 |
| Test yourself | EpiMethods quiz | — |
Paste into the Model code box at dagitty.net. With Ill, Before and After marked latent (never measured), dagitty reports that no adjustment set exists. Remove the latent tags from Ill and Before, and it returns {Before, Ill, L}.
dag {
Obese [exposure] Death [outcome] Ill [latent] Before [latent] After [latent]
L -> Obese L -> Death L -> Before
Ill -> Obese Ill -> Death
Before -> Obese Before -> Death Before -> After
Obese -> After After -> Death Obese -> Death
Before -> Blend After -> Blend
}
L = age, sex, race/ethnicity, income, smoking, physical activity. Ill = serious illness that causes weight loss. Blend = the recorded “has diabetes (etc.)” variable.