57 templates
Causal DAG templates
Native causal directed-acyclic graphs for epidemiology and inference. Declare nodes by role — `exposure`, `outcome`, `confounder`, `mediator`, `unobserved` — and the engine colour-codes them and lays out the diagram so the causal story reads left-to-right. Bidirected (`---`) edges render as dashed double-headed arcs for unmeasured association.
Causal DAG — smoking & lung cancer
Classic epidemiology DAG with age as confounder and tar as mediator.
Research & AcademicCausal DAG — randomised trial
Why randomisation breaks the confounder path.
Research & AcademicCausal DAG — education and income
Effect of education on income with confounders and mediator.
Research & AcademicCausal DAG — diet & cardiovascular risk
Diet effect on CV outcomes with BMI as mediator.
Research & AcademicCausal DAG — vaccine effectiveness
Test-negative design with healthcare seeking as confounder.
Research & AcademicCausal DAG — three-step mediation chain
Sequential mediators between exposure and outcome.
Research & AcademicCausal DAG — minimum wage policy
Policy effect on employment with confounders and an unobserved path.
Research & AcademicCausal DAG — collider bias
Illustrating how conditioning on a collider opens a spurious path.
Research & AcademicCausal DAG — medication & fall risk
Polypharmacy effect on falls in the elderly.
Research & AcademicCausal DAG — feature launch & revenue
Product analytics framing of a feature's effect on revenue.
Business & StrategyMarketing Attribution (Causal DAG)
Ad spend, site visits and sales with seasonality.
Business & StrategyA/B Test Structure (Causal DAG)
Randomisation, variant, engagement and conversion.
Data & SchemaConfounding (Causal DAG)
The classic coffee-smoking-heart-disease example.
Research & AcademicCausal DAG — Statin Adherence and Mortality
Confounding structure for an observational study of statin adherence and cardiovascular mortality, with healthy-adherer behaviour as the unmeasured common cause the analysis must address.
Research & AcademicCausal DAG — Roadside NO2 and Childhood Asthma
Directed acyclic graph for a birth cohort study of roadside nitrogen dioxide and incident childhood asthma, distinguishing residential self-selection from the housing and smoking confounders.
Research & AcademicCausal DAG — Prescribing and Resistant Infection
Causal graph linking primary-care antibiotic prescribing to resistant urinary infection, with prior colonisation as a mediator and care-home residence as a confounder acting through both paths.
Life SciencesDriver Fatigue and Collision Risk (Causal DAG)
Telematics causal structure where shift pattern confounds the hours-driven to collision path and home sleep quality is unmeasured.
Risk & ReliabilityRecommender Exposure and Purchase (Causal DAG)
Why naive click-through attribution overstates a recommender: item popularity drives both what gets shown and what gets bought.
AI & PipelinesBiology — Causal DAG: Smoking & Lung Cancer
Confounding by age and mediation through tar.
Life SciencesBiology — Causal DAG: Confounding
The classic confounder structure.
Life SciencesBiology — Causal DAG: Collider Bias
Conditioning on a common effect opens a spurious path.
Life SciencesBiology — Causal DAG: Exercise & Heart Disease
Multiple confounders and a weight mediator.
Life SciencesBiology — Causal DAG: Healthy-Vaccinee Bias
Why observational vaccine studies can mislead.
Life SciencesMath — Causal DAG: Mediation
Direct and indirect (mediated) effects.
MathematicsMath — Causal DAG: Selection Bias
Selecting on a common effect of exposure and outcome.
MathematicsMath — Causal DAG: Instrumental Variable
An instrument affects the outcome only via the exposure.
MathematicsMath — Causal DAG: Back-Door Path
A confounder opens a back-door path to be blocked.
MathematicsMath — Causal DAG: Randomised Trial
Randomisation removes the arrow from confounders to treatment.
MathematicsBiology — Causal DAG: Diet & Diabetes
Obesity mediates, age and SES confound.
Life SciencesBiology — Causal DAG: Air Pollution & Asthma
Airway inflammation mediates the effect.
Life SciencesBiology — Causal DAG: Birth-Weight Paradox
Conditioning on a collider creates a false protective effect.
Life SciencesMath — Causal DAG: Time-Varying Confounding
A confounder that is also affected by earlier treatment.
MathematicsMath — Causal DAG: Simpson's Paradox
A confounder reverses an apparent effect.
MathematicsBiology — Causal DAG: Obesity & Heart Disease
Multiple mediators and confounders.
Life SciencesBiology — Causal DAG: Healthy-User Bias
Why exercise studies can overstate benefit.
Life SciencesMath — Causal DAG: Mediation vs Moderation
A mediator lies on the path; a moderator changes it.
MathematicsBiology — Sleep and Immune Function
Cytokines mediate; chronic stress confounds.
Life SciencesMaths — The Confounding Triangle
A confounder opens a backdoor path X ← Z → Y.
MathematicsBiology — Mendelian Randomization
A genetic variant as an instrumental variable.
Life SciencesBiology — Simpson's Paradox
Severity confounds the treatment-recovery link.
Life SciencesMaths — Instrumental Variable
An instrument identifies a causal effect despite confounding.
MathematicsBiology — Mediation Analysis
Direct and indirect (mediated) causal paths.
Life SciencesBiology — Selection Bias (Collider)
Conditioning on study entry opens a collider path.
Life SciencesBiology — Randomized Controlled Trial
Randomization removes confounding of the treatment.
Life SciencesBiology — Time-varying Confounding
Treatment-confounder feedback over time.
Life SciencesBiology — Healthy Worker Effect
Selection into the workforce is a collider.
Life SciencesBiology — Survivorship Bias
Conditioning on survival opens a collider path.
Life SciencesBiology — Confounder vs Mediator
Adjust for confounders, not for mediators.
Life SciencesMaths — Front-door Criterion
A mediator identifies the effect despite confounding.
MathematicsBiology — Reverse Causation
The true effect runs opposite to the assumption.
Life SciencesBiology — Immortal Time Bias
Surviving to be treated inflates treated-group survival.
Life SciencesBiology — Attrition Bias
Loss to follow-up is a collider of exposure and outcome.
Life SciencesMaths — Conditioning on a Collider's Descendant
Adjusting for a descendant of a collider opens bias.
MathematicsBiology — Effect Modification
A modifier changes the size of an exposure's effect.
Life SciencesBiology — M-bias
A collider can bias even pre-exposure adjustment.
Life SciencesMaths — A Causal Chain (Pipe)
Conditioning on the middle blocks the association.
MathematicsBiology — A Fork (Common Cause)
A common cause creates a spurious association.
Life Sciences