← Methods repository
CONCEPTINTERMEDIATEPYTHON · R · SAS6 citations

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.

Bias Controlcollider-biasindex-event-biasberkson-biasm-biasselection-biasdagbackdoor-pathdisease-progression-cohort
On this page
Methods reference only. Use primary source citations and local policy before applying this in a study protocol, regulatory submission, payer dossier, or clinical decision.
In plain language

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.

When to use it
Draw the full DAG first to decide the complete adjustment set; use this entry's checklist of recurring RWE collider patterns to catch the specific traps a general DAG discussion can gloss over.
Use collider/index-event diagnosis first to decide whether the sample is selected on a collider; apply selection-bias sensitivity analysis or quantitative bias analysis to bound the residual bias only once avoidance...
Use dedicated collider-aware sensitivity approaches (or explicit weighting back to the source population) rather than a standard confounding E-value when the sample is known to be collider-selected.
Watch out for
Does not replace full DAG specification, which remains the general tool for identifying the entire admissible adjustment set, not just the collider-shaped traps.
Does not itself supply the quantitative bounding math for residual bias once the selection cannot be avoided.
Does not itself provide quantitative bias-analysis formulas for the collider case.

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"| Z
The generic collider mechanism. Two independent risk factors both cause a common downstream variable (a collider). Left alone, the collider blocks any path between them; conditioning on it — by restriction, matching, stratification, or covariate adjustment — opens a spurious statistical association between the two risk factors.
flowchart 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]
Index-event bias worked-example DAG. Severity (T) and aspirin non-use (S) independently cause the index MI (the collider). Restricting to the post-MI cohort induces a spurious association between T and aspirin use, which shows up as an apparent aspirin-recurrence association even though aspirin has no true causal effect on recurrence in this toy model.
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]
M-bias structure. The measured covariate M sits between two unmeasured factors that separately cause exposure A and outcome Y, forming an M-shape on the diagram. Adjusting for M — treating it as a routine pre-exposure covariate — opens a path between the two unmeasured factors and creates bias even though A and Y had no confounding relationship before the adjustment.
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]
Detection and mitigation decision logic. Draw the DAG first; classify each candidate sample-restriction or covariate as a collider or not before deciding whether to condition on it, and escalate to explicit sensitivity analysis only when redesigning away the conditioning is infeasible.

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_Tpre_index_aspirin_usepatients_in_post_mi_cohortrecurrent_mi_in_2yrrecurrent_mi_rate
T present (severe atherosclerosis)On aspirin1405640.0%
T present (severe atherosclerosis)Not on aspirin602440.0%
T absentNot on aspirin2402410.0%

Steps

1In the source population of 1,000, T (20% prevalence) and not being on aspirin (30% prevalence) are independent by construction — the four cross-tabulated cells are 60, 140, 240, and 560, exactly what independence predicts.
2The first MI (index event) is a collider — it occurs whenever T is present or the patient is not on aspirin — so only 440 of the 1,000 people ever qualify for the post-MI cohort; the other 560 (no T, on aspirin) never appear in any disease-progression study of this population.
3Conditioning on having had the index event breaks the independence — among the 140 aspirin users who nonetheless had an MI, 100% carry the severity factor T, versus only 60 of 300 (20%) among non-aspirin-users who had an MI.
4True 2-year recurrence risk in this toy model depends only on T (40% if present, 10% if absent) and aspirin has no causal effect on recurrence at all — that causal structure was built into the numbers on purpose.
5Because aspirin users in the selected cohort are almost entirely T-positive, their crude recurrence rate (56 of 140 = 40.0%) comes out exactly 2.5 times the non-aspirin-user rate (48 of 300 = 16.0%), even though aspirin's true effect on recurrence is zero — this is exactly the aspirin-paradox / index-event-bias signature.

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

Pros of this
Names and operationalizes the specific, high-frequency collider traps that recur in RWE cohort building and covariate selection (index event, Berkson/informative presence, database selection, M-bias) with claims/EHR diagnostics and a worked example for each.
Pros of this
Diagnoses and helps avoid the mechanism at the design stage — recognizing that a sample or covariate is collider-selected before any modeling starts.
Pros of this
Flags that the direction and mechanism of collider-induced bias are structurally different from classic unmeasured confounding, so a confounding-shaped bounding tool applied naively to a collider-selected sample can mislead.
Pros of this
Generalizes beyond EHR encounter frequency to any collider-shaped selection — disease-progression cohorts, case-control sampling, database enrollment, and M-bias covariate selection.
Cons of this
Has less EHR-specific mechanical detail (visit-driven capture, lab-ordering patterns) than the dedicated informative-presence entry.
When to prefer Use informative-presence for EHR encounter/testing-frequency mechanics specifically; use this entry as the general collider/DAG umbrella for non-EHR settings such as disease-progression cohorts and case-control designs.

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.

requires: pandas
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.0

Citations

FOUNDATIONAL / METHODS
  1. [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. [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. [3]Westreich D. Berkson's bias, selection bias, and missing data. Epidemiology. 2012;23(1):159-164.
APPLIED EXAMPLES
  1. [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.
  2. [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.
REPORTING & GUIDANCE
  1. [6]Griffith GJ, Morris TT, Tudball MJ, Herbert A, Mancano G, Pike L, et al. Collider bias undermines our understanding of COVID-19 disease risk and severity. Nature Communications. 2020;11:5749.