P3 effect modification

P3 — Effect modification

Week 5 · applies L4 (Interaction) · optional and ungraded — no separate deadline, nothing to submit; M1 is assembled from these five increments Keep in your group GitHub repo: stratum-specific estimates + a formal interaction test + a short interpretation.

The question this week

Does your main exposure–outcome association differ across a scientifically meaningful subgroup? This week you take the main estimate you built in P2 — your current best estimate, before the design-aware re-estimate at P4 — and ask whether one number actually hides two, i.e. whether some group carries the effect.

What to do

  1. Choose one effect modifier with a rationale. Sex, age band, income, or a clinical subgroup your exposure cannot cause — and say why modification is biologically/socially plausible. One well-argued modifier beats a fishing expedition. The modifier must be something your exposure cannot change. The safe check is time: sex, age, genes, or a condition that began before the exposure. Being recorded at the same visit is not enough — ask whether your exposure could have caused it. A variable your exposure can change, such as a disease it causes, turns the question into mediation, not modification: stratifying on it removes part of the effect and compares unlike people (Week 5, “The modifier must survive the ‘could A change it?’ test”). Say which question you are asking: effect modification (your exposure’s effect, by M — adjust for your exposure’s confounders) or interaction (two exposures — adjust for the confounders of both).
  2. Count, then estimate stratum-specific effects. Tabulate people and outcomes in every exposure × modifier cell first; a sparse cell decides how much any interaction measure can tell you. Then fit the association within each level of the modifier and report the estimates side by side.
  3. Test for modification formally, on the right scale (a product term is the tool).
  4. Interpret. Report the stratum-specific estimates and the interaction test with their intervals, and state which scale you tested and why. A crude stratum difference is not an interaction test, and a null test is not evidence of homogeneity — say what the data show at the precision you have, and do not claim to have identified what produced any crude difference.

Deliverable

Worked example — MASLD/NHANES demonstration

What good looks like

Be ready to defend (M3)

“You report an interaction by sex. Is that genuine effect modification, or just what you’d expect from men and women having different baseline mortality? Defend the scale you tested it on.”

AI co-pilot note

Because the interaction lab uses a binary-outcome RERI example, a co-pilot will often copy that recipe — coding “ever died” and fitting logistic regression — which throws away survival time. For a time-to-event paper you must move the interaction into the survival model. Don’t let the lab’s convenient example dictate your project’s method.

Lab → project handoff

You are applying L4 (Interaction) — product terms, stratum-specific estimates, and additive vs multiplicative modification (EpiMethods confoundingE2). Assess it on the scale your outcome demands.