Causal Inference with DAGs in Pediatric Clinical Research
- Mayta

- May 7
- 3 min read
🎯 Learning Objectives
By the end of this guide, you’ll be able to:
✅ Classify variables into confounders, mediators, colliders, and effect modifiers ✅ Detect bias paths using DAGs ✅ Use DAGitty to build and test your DAG ✅ Apply causal logic to real-world clinical studies
🩺 Clinical Question (New Example)
Does initiating antipyretic treatment within 30 minutes reduce the risk of seizure recurrence in children presenting with febrile seizure?
DEPTh Type: Therapeutic (intervention → outcome)
📌 1. DAG = Directed Acyclic Graph
What’s a DAG?
Directed: Arrows show assumed causality
Acyclic: No loops allowed—no feedback
Graph: A visual model of assumed causal structure
🧠 DAGs map your thinking, not just your variables.
🧠 2. Classifying Variable Roles
*Adjust for mediator only if estimating direct effect.
🧪 3. Drawing the DAG
dagittydag {
FeverSeverity -> EarlyAntipyretic
FeverSeverity -> SeizureRecurrence
EarlyAntipyretic -> TempDecline
TempDecline -> SeizureRecurrence
Epilepsy -> SeizureRecurrence
Epilepsy -> EarlyAntipyretic
ED_Crowding -> EarlyAntipyretic
}
✅ Adjust for: FeverSeverity, Epilepsy
❌ Don’t adjust for: TempDecline (mediator), ED_Crowding (precursor), LengthOfStay (collider)
🔗 Try it: Open DAG in DAGitty
🔁 4. Understanding Path Types
🧠 Collider adjustment = new bias creation, not removal.
🧱 5. Backdoor Control
🎯 Backdoor paths = non-causal routes that simulate effects.
To close them:
Identify confounders on these paths
Adjust using regression, matching, and stratification
Validate with DAGitty’s “Adjustment Sets”
In our case:
EarlyAntipyretic ← FeverSeverity → SeizureRecurrence
EarlyAntipyretic ← Epilepsy → SeizureRecurrence ✅ Adjusting for FeverSeverity and Epilepsy blocks both paths.
💥 6. Collider Trap in Pediatric Context
New Scenario:
Let’s add:
dagittyLengthOfStay -> EarlyAntipyretic
LengthOfStay -> SeizureRecurrence But wait — that's wrong. LengthOfStay is affected by both:
dagittydag {
EarlyAntipyretic -> LengthOfStay
SeizureRecurrence -> LengthOfStay
}
Here, LengthOfStay is a collider. ❌ Adjusting for it opens a backdoor: EarlyAntipyretic → LOS ← SeizureRecurrence
🎭 7. Effect Modification vs. Interaction
Model it with: X + Z + X*Z Visualize it by: Stratified DAGs or subgroup KM curves
🧩 8. Clinical Reasoning First: Then Model
Use this workflow:
Clinical Question → Variable Roles → DAG → DAGitty Adjustment → Regression Model
❌ Don’t start with a dataset ✅ Start with causal structure
📋 9. DAG Construction Checklist
Define exposure (X) and outcome (Y)
Identify variable roles:
Confounders
Mediators
Colliders
Precursors
Draw DAG (DAGitty or pen + paper)
Run Adjustment Sets in DAGitty
Build a regression model with justified covariates
✅ Final Takeaways
DAGs ≠ illustrations — they are logic blueprints for your research.
Adjust only confounders; avoid colliders unless modeling effect mediation.
DAGitty helps verify if your adjustment set is both valid and minimal.
Model causal paths, not just correlations.
DEPTh logic ensures alignment with clinical decision-making.





Comments