Collider Bias and Index-Event Bias
A structural bias created whenever an analysis conditions — by restriction, matching, stratification, or covariate adjustment — on a variable that is a common effect of two other variables (a collider); the conditioning opens a spurious statistical path between those two variables even when neither causes the other, and it takes several RWE-specific forms including index-event bias in disease-progression cohorts, Berkson bias in hospital/EHR sampling, selection into a database as a collider, and M-bias introduced by covariate selection.
On this page
Collider bias happens when a study filters, restricts, or statistically adjusts for a variable that is itself caused by two separate things (a "collider") — doing that can make those two unrelated things look connected purely because of how the study group was assembled, not because either one really affects the other. A common real-world flavor is index-event bias, where a cohort built from people who already had a first heart attack, stroke, or hospital stay treats that qualifying event as the collider, and comparisons made afterward — the "obesity paradox," the "aspirin paradox" — can be scrambled by the selection rather than by biology. It also creeps in from how the data itself gets collected — hospital-only or heavily-tested populations are a database-level version of the same problem, because being admitted or tested usually depends on more than one thing at once. There is no clean after-the-fact fix once the biased sample exists; the honest options are to not build the conditioned sample in the first place or to explicitly model and weight the selection back out.
A collider is a variable with two or more direct causes pointing into it — the node where two arrows meet head to head on a causal diagram. Left alone, a collider blocks any statistical path running through it: two independent causes of the same effect stay uncorrelated in the general population. The trouble starts the moment an analysis conditions on the collider — restricts the sample to a specific value of it, matches on it, stratifies by it, or adjusts for it in a regression. Conditioning on a common effect opens a backdoor path between its causes that did not exist before, manufacturing an association (or destroying a real one) that has nothing to do with either cause acting on the other. This single mechanism, first named formally by Berkson in 1946 for hospital admission and generalized by Pearl's DAG (directed acyclic graph) framework, resurfaces constantly in RWE under different names because database studies are built from conditioned samples almost by definition: a claims cohort is people who filed a claim, an EHR cohort is people who showed up and were tested, a disease-progression cohort is people who already had the first event.
Core conceptual distinction
Collider bias is the mirror image of confounding, and mixing the two up produces the opposite of the intended fix. A confounder is a common cause of exposure and outcome; leaving it unadjusted opens a backdoor path, so the remedy is to condition on it. A collider is a common effect; conditioning on it is what opens the path, so the remedy is to leave it alone. Four RWE-specific patterns recur:
- Index-event bias. A disease-progression cohort is, by construction, restricted to people who already had a qualifying first event (the index event — a first MI, stroke, hospitalization, or diagnosis). If two risk factors independently raise the chance of that first event, the index event is a collider of both, and within the already-selected cohort the two factors become correlated with each other even though they were independent in the source population. This is the mechanism behind the "obesity paradox" (obesity looks protective for outcomes among people who already have cardiovascular disease, even though it is a genuine risk factor for developing the disease in the first place) and the aspirin/recurrent-MI paradox (aspirin users who nonetheless had a first MI are enriched for other, stronger risk drivers, making aspirin look harmful for recurrence when its true effect is null or protective).
- Berkson bias / informative presence. Hospital-, registry-, or EHR-based sampling conditions on being admitted, tested, or captured in the data at all. When the exposure and the outcome (or two candidate risk factors) each independently raise the odds of that capture event, restricting to the captured sample induces exactly the same spurious association as index-event bias, just with "appeared in this dataset" standing in for "had the index event." This is the classical hospital-fourfold-table problem and the modern "collider bias undermines our understanding of COVID-19" problem: testing, hospitalization, and biobank participation are each driven by multiple independent factors, so risk-factor associations estimated only among the tested/hospitalized/enrolled subset do not transport to the source population.
- Selection into the database as a collider. Being insured, remaining enrolled, having claims submitted, or having a lab ordered are themselves outcomes of multiple upstream processes (income, health-seeking behavior, disease severity, plan design). Any RWE study is implicitly conditioned on "is observable in this database," and when exposure and outcome both independently influence observability, the observed association is biased even before any covariate is touched. This is the database-level analogue of Berkson bias and the reason "complete case" claims/EHR analyses are never a neutral default.
- M-bias in covariate selection. Adjusting for every "pre-exposure" variable available is not automatically safe. If a measured pre-exposure covariate is itself a collider of two unmeasured factors — one that independently affects exposure, one that independently affects the outcome — then adjusting for that covariate opens a path between the two unmeasured factors and can create bias in a study that had no confounding at all before the "adjustment." The covariate forms the middle of an M-shaped diagram (hence the name), and it is the standard counter-example to "adjust for everything measured before treatment."
Pros, cons, and trade-offs
This entry names a bias mechanism rather than a single design, so the trade-offs are between detection/avoidance strategies:
- Avoid conditioning (design prevention) vs restrict-then-correct. The cleanest fix is to never build the conditioned sample in the first place — study the source population, or define the cohort at a time zero that precedes the collider (e.g., a new-user cohort at treatment initiation rather than a "current users with X years of disease" cohort). Cost: this can be infeasible when the exposure or database itself only exists in a post-event world (registries that enroll after diagnosis; claims that only exist for people who filed them). Prefer avoidance whenever the source-population question is answerable and the collider can be moved earlier or removed from the design.
- DAG-based prospective avoidance vs post hoc quantitative bias analysis (QBA). Drawing the DAG before touching data and refusing to adjust for anything downstream of exposure or a suspected collider is cheap and prevents the bias outright. Cost: it depends on getting the causal structure right, and unmeasured colliders can be invisible until named. Prefer the DAG as the default first step; escalate to negative-control outcomes, E-value-style bounding, or dedicated selection-bias QBA only for the collider structures that cannot be designed away (see `selection-bias-sensitivity-analysis-rwe`).
- Weighting back to the source population vs accepting the conditioned estimand. Inverse-probability-of-selection weighting can, in principle, reconstruct the source-population association from a collider-selected sample if the selection mechanism is fully specified and measured. Cost: this requires knowing and measuring everything that drives selection, which is rarely true for index-event or database-inclusion colliders — an underspecified selection model can leave the bias only partially corrected while looking fixed. Prefer explicit acknowledgment of the conditioned estimand (e.g., "risk among people who already survived a first MI") over a fragile reweighting when the selection mechanism cannot be fully characterized.
When NOT to use — and when it is actively misleading
- Do not call every attenuated or reversed association "collider bias" without drawing the diagram; a genuinely weaker effect in a subgroup, effect modification, or reverse causation can look similar and needs different fixes.
- Do not "solve" index-event bias by adjusting for the index event's severity or timing measured after the index event — those variables are frequently descendants of the very collider you are trying to avoid, and adjusting for them can deepen rather than remove the bias.
- Do not treat M-bias as a reason to adjust for nothing; the disjunctive-cause heuristic (adjust for anything that is a cause of exposure or outcome, pre-exposure) still removes far more confounding than it introduces M-bias in most realistic RWE covariate sets. M-bias is a caution against blind "adjust for everything available," not an argument for minimal adjustment.
- Do not assume weighting back to a source population has fixed the bias just because the weights were fit; an underspecified selection model (missing a driver of who enters the database, gets tested, or survives to the index event) leaves residual, usually undetectable, collider bias.
Data-source operational depth
- Claims: The qualifying diagnosis or procedure code that defines a disease-progression cohort is frequently a collider of multiple independent clinical pathways; so is "continuously enrolled" (itself a function of employment, income, and health). Complete-case filtering on claims completeness, or restricting to members with a full lookback, silently conditions on observability. Workaround: define time zero as early as the exposure/question allows, avoid restricting on anything that happens after time zero, and document the selection criteria as an explicit node on the DAG rather than an unexamined inclusion rule.
- EHR: Being "in the EHR" at all, having a given lab ordered, and visit frequency are colliders driven jointly by disease severity, insurance access, and clinician behavior — the informative-presence problem. Hospital- or ICU-only extracts are textbook Berkson settings. Workaround: link to a less-selected source (claims, vital records, a health-system-wide registry) to recover the source population, or explicitly model the encounter process rather than treating "observed" as "unexposed/no event."
- Registry: Most disease registries enroll only after a triggering diagnosis or procedure — the registry population is, definitionally, an index-event-selected cohort, and voluntary-enrollment registries add a second collider layer (willingness to enroll, itself driven by multiple factors). Workaround: use registries for within-cohort natural-history and treatment-effect questions where the conditioning is transparent and consistent across compared groups, not for incidence or risk-factor questions that require the source population.
- Linked data: Linkage success itself can be a collider — patients who link cleanly across claims, EHR, and vital records may differ systematically from those who do not. Linked data is nonetheless the best substrate for detecting index-event and M-bias, because it usually offers more of the covariates (severity scores, comorbidity detail, mortality) needed to measure and adjust for the unmeasured driver instead of leaving it as an open collider path.
Worked example
Two independent factors exist in a source population of 1,000 people: unmeasured severe atherosclerosis (T, present in 20%) and not being on preventive aspirin (S, present in 30%), independent of each other by construction. A first MI (the index event) occurs whenever T=1 or S=1 — 440 people qualify for the post-MI cohort; the 560 people with neither factor never enter it. Inside that cohort, T and aspirin-use are no longer independent: 100% of aspirin users who nonetheless had an MI carry T, versus only 20% of non-aspirin-users who had an MI. If true 2-year recurrence risk depends only on T (40% vs 10%) and aspirin has zero causal effect on recurrence, the crude recurrence rate among aspirin users in this cohort is 40.0% versus 16.0% among non-users — aspirin appears to roughly triple recurrence risk purely because the index event (a collider of T and aspirin-use) selected aspirin users into a T-enriched subgroup. See `worked_example` below for the full arithmetic.
Decision diagram
flowchart LR
X[Risk factor 1] --> C{{Collider<br/>common effect of both}}
Z[Risk factor 2] --> C
C -. "conditioning here<br/>(restrict / match / stratify / adjust)<br/>OPENS a spurious path" .-> SPURIOUS[X and Z become<br/>statistically associated<br/>even though neither causes the other]
X -.-x|"no direct path<br/>if left unconditioned"| Zflowchart LR
T[Unmeasured severity T<br/>20% prevalence] --> IDX{{Index MI<br/>collider: T=1 OR S=1}}
S[Not on aspirin S<br/>30% prevalence] --> IDX
IDX -->|"select on<br/>having had the index MI"| COHORT[Post-MI cohort<br/>440 of 1,000]
COHORT -. "conditioning on IDX<br/>opens a spurious path" .-> LINK[T and aspirin-use<br/>now correlated:<br/>100% of aspirin users vs<br/>20% of non-users carry T]
T --> RECUR[True recurrence risk<br/>40% if T present, 10% if absent]
LINK -.->|"crude, unadjusted"| ASPIRIN_ASSOC[Aspirin appears associated<br/>with 2.5x higher recurrence<br/>true effect = 1.0]flowchart TB
U1[Unmeasured factor 1<br/>e.g. health consciousness] --> A[Exposure A]
U1 --> M{{Measured covariate M<br/>e.g. a screening result}}
U2[Unmeasured factor 2<br/>e.g. underlying frailty] --> Y[Outcome Y]
U2 --> M
A -.->|"no confounding path<br/>exists before adjustment"| Y
M -. "adjusting for M<br/>OPENS U1-U2 path" .-> BIAS[Spurious A-Y association<br/>created by the adjustment itself]flowchart TD
START[Candidate sample or<br/>covariate under review] --> DRAW[Draw the DAG:<br/>mark every variable as<br/>cause, effect, or both<br/>relative to exposure/outcome]
DRAW --> Q1{Is this variable a<br/>common EFFECT of two<br/>things you care about?}
Q1 -->|Yes: it's a collider| AVOID[Do not restrict, match,<br/>stratify, or adjust on it]
Q1 -->|No: it's a cause<br/>or unrelated| ADJUST[Safe to adjust if it is<br/>a pre-exposure cause of<br/>exposure or outcome]
AVOID --> FEASIBLE{Can the study be<br/>redesigned to avoid<br/>conditioning on it?}
FEASIBLE -->|Yes| REDESIGN[Move time zero earlier /<br/>use source population /<br/>drop the restriction]
FEASIBLE -->|No: e.g. registry only<br/>enrolls post-diagnosis| SENS[Report the conditioned<br/>estimand explicitly +<br/>selection-bias sensitivity<br/>analysis / weighting back<br/>to source population]Worked example
Scenario
A pharmacoepidemiologist wants to know whether prior aspirin use affects the risk of a recurrent heart attack (MI) among patients who already had a first MI. In a hypothetical source population of 1,000 people, two factors are independent of each other by construction — unmeasured severe atherosclerosis (T) and not taking preventive aspirin (S) — and either one is enough to trigger a first MI. The analyst only ever gets to see the post-MI cohort (the people for whom the index event happened), and only measures aspirin use, not T.
Dataset
Toy post-MI (index-event-selected) cohort by unmeasured severity factor (T) and pre-index aspirin use. The 560 people with neither T nor a lack of aspirin protection never had a first MI and are absent from this table entirely — they never enter the disease-progression cohort.
| unmeasured_severity_T | pre_index_aspirin_use | patients_in_post_mi_cohort | recurrent_mi_in_2yr | recurrent_mi_rate |
|---|---|---|---|---|
| T present (severe atherosclerosis) | On aspirin | 140 | 56 | 40.0% |
| T present (severe atherosclerosis) | Not on aspirin | 60 | 24 | 40.0% |
| T absent | Not on aspirin | 240 | 24 | 10.0% |
Steps
Result
- Label
Crude recurrence rate ratio, aspirin users vs non-users in the post-MI cohort = 40.0% / 16.0% = 2.5, entirely attributable to index-event (collider) selection; the true causal rate ratio for aspirin on recurrence is 1.0 by construction.
- Value
2.5
Trade-offs
Runnable example
Reproduces this entry's toy population to show collider/index-event bias mechanically: two independent binary factors (T = unmeasured severity, S = not on preventive aspirin) generate a deterministic index event (T=1 OR S=1); recurrence risk depends only on T.
import pandas as pd
import itertools
def build_population(n_low_low=560, n_low_s=240, n_t_low=140, n_t_s=60):
# Cells keyed by (T, S): T=severity present, S=not on aspirin (risk-raising absence of protection)
rows = []
for (t, s), n in {
(0, 0): n_low_low, # never has the index event; absent from any post-MI cohort
(0, 1): n_low_s,
(1, 0): n_t_low,
(1, 1): n_t_s,
}.items():
rows.append({"T": t, "S": s, "n": n})
return pd.DataFrame(rows)
def index_event_occurs(t: int, s: int) -> bool:
return bool(t) or bool(s) # collider: either factor alone is sufficient
def recurrence_rate(t: int) -> float:
return 0.40 if t == 1 else 0.10 # true causal model: depends only on T, never on S/aspirin
pop = build_population()
pop["has_index_mi"] = pop.apply(lambda r: index_event_occurs(r["T"], r["S"]), axis=1)
# Source population: confirm T and S are independent (odds ratio == 1.0).
src = pop.pivot_table(index="T", columns="S", values="n", aggfunc="sum")
src_or = (src.loc[0, 0] * src.loc[1, 1]) / (src.loc[0, 1] * src.loc[1, 0])
print("Source-population OR(T,S):", round(src_or, 3)) # ~1.0: independent by construction
# Post-index (collider-selected) cohort: T and S become associated.
cohort = pop[pop["has_index_mi"]].copy()
cohort["recurrences"] = cohort.apply(lambda r: r["n"] * recurrence_rate(r["T"]), axis=1)
by_aspirin = cohort.groupby("S")[["n", "recurrences"]].sum()
by_aspirin["rate"] = by_aspirin["recurrences"] / by_aspirin["n"]
print(by_aspirin) # S=0 (aspirin users): ~40.0% crude recurrence; S=1 (non-users): ~16.0%
crude_rr = by_aspirin.loc[0, "rate"] / by_aspirin.loc[1, "rate"]
print("Crude aspirin recurrence rate ratio (biased):", round(crude_rr, 2)) # ~2.5, true RR = 1.0Same toy population and mechanism in base R: builds the source-population cross-tab, applies the deterministic index-event collider, and compares the crude (biased) vs. true recurrence rate ratio by aspirin status.
build_population <- function() {
data.frame(
severity = c(0, 0, 1, 1), # T: unmeasured severe atherosclerosis
no_aspirin = c(0, 1, 0, 1), # S: not on preventive aspirin
n = c(560, 240, 140, 60)
)
}
recurrence_rate <- function(t) ifelse(t == 1, 0.40, 0.10) # true model depends only on severity
pop <- build_population()
pop$has_index_mi <- (pop$severity == 1) | (pop$no_aspirin == 1) # collider: either factor triggers the index event
# Source population independence check (odds ratio).
src <- xtabs(n ~ severity + no_aspirin, data = pop)
src_or <- (src["0", "0"] * src["1", "1"]) / (src["0", "1"] * src["1", "0"])
cat("Source-population OR(severity, no_aspirin):", round(src_or, 3), "\n") # ~1.0
# Post-index (collider-selected) cohort.
cohort <- pop[pop$has_index_mi, ]
cohort$recurrences <- cohort$n * recurrence_rate(cohort$severity)
by_aspirin <- aggregate(cbind(n, recurrences) ~ no_aspirin, data = cohort, sum)
by_aspirin$rate <- by_aspirin$recurrences / by_aspirin$n
print(by_aspirin) # no_aspirin=0 (aspirin users) ~40.0%, no_aspirin=1 (non-users) ~16.0%
crude_rr <- by_aspirin$rate[by_aspirin$no_aspirin == 0] / by_aspirin$rate[by_aspirin$no_aspirin == 1]
cat("Crude aspirin recurrence rate ratio (biased):", round(crude_rr, 2), "\n") # ~2.5, true RR = 1.0Diagnostic pattern for detecting collider-induced association in an already-built claims/registry extract: cross-tabulate a candidate risk factor against a second candidate risk factor first in the full available population, then again restricted to the index-event (or database-inclusion) flag, and compare the odds...
/* Step 1: OR between two candidate risk factors in the widest available (least-restricted) extract. */
proc freq data=work.full_population;
tables riskfactor_t * riskfactor_s / chisq relrisk;
run;
/* Step 2: same OR, restricted to the index-event (or database-inclusion) flag = 1. */
/* If this OR differs materially from Step 1 with no substantive interaction rationale, treat the */
/* difference as evidence of collider/index-event selection, not a real effect-modification signal. */
proc freq data=work.full_population;
where has_index_event = 1;
tables riskfactor_t * riskfactor_s / chisq relrisk;
run;
/* Documentation, not a fix: patients with has_index_event = 0 who were never captured by the source */
/* database at all (rather than merely excluded by this WHERE clause) cannot be recovered by SAS - */
/* the selection happened before the extract existed. Report the conditioned estimand explicitly. */Citations
- [1]Cole SR, Platt RW, Schisterman EF, Chu H, Westreich D, Richardson D, Poole C. Illustrating bias due to conditioning on a collider. International Journal of Epidemiology. 2010;39(2):417-420.
- [2]Dahabreh IJ, Kent DM. Index event bias as an explanation for the paradoxes of recurrence risk research. JAMA. 2011;305(8):822-823.
- [3]Westreich D. Berkson's bias, selection bias, and missing data. Epidemiology. 2012;23(1):159-164.
- [4]Smits LJ, van Kuijk SM, Leffers P, Peeters LL, Prins MH, Sep SJ. Index event bias-a numerical example. Journal of Clinical Epidemiology. 2013;66(2):192-196.
- [5]Liu W, Brookhart MA, Schneeweiss S, Mi X, Setoguchi S. Implications of M bias in epidemiologic studies: a simulation study. American Journal of Epidemiology. 2012;176(10):938-948.