Group & conditional effects with DoubleML (GATE / CATE)
@misc{doubleml,
title = {DoubleML},
author = {Bach and Chernozhukov and Kurz and Spindler},
howpublished = {\url{https://docs.doubleml.org/}},
note = {Software / documentation}
}Follow the analysis.
Select a node to explore the method
Build DoubleMLData (y, d, X)
Data preparation — shapes the raw inputs into what the estimator expects.
Declare outcome, binary treatment and covariates.
dml_data = dml.DoubleMLData(df, y_col='y', d_cols='d', x_cols=X)
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
Fit an Interactive Regression Model (IRM)
The core estimate — where the causal quantity itself is computed.
Cross-fitted, Neyman-orthogonal IRM with ML nuisances — the per-unit signal for heterogeneity.
dml_irm = dml.DoubleMLIRM(dml_data, ml_g, ml_m).fit()
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
Group Average Treatment Effects
Heterogeneity — who is affected, and by how much, not just on average.
Average the orthogonal signal within each group to get a GATE per subgroup.
gate = dml_irm.gate(groups=groups); gate.confint(joint=True)
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
CATE via a basis expansion
Heterogeneity — who is affected, and by how much, not just on average.
Project the signal onto a spline basis to trace a smooth CATE in a covariate.
cate = dml_irm.cate(basis); cate.confint(X_grid, joint=True)
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
Plot with simultaneous bands
Reporting — turn the numbers into a figure or table a reader can act on.
Show GATE bars and the CATE curve with joint (not pointwise) confidence bands.
# matplotlib: GATE bars + CATE curve with joint CIs
Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.
Questions to explore- Which assumption matters most here, and what evidence could challenge it?
- What would you check before passing this output to the next step?
Choose a question to start your comment.
Peer discussion
- Bring your experience, a question, or a different perspective.
Log in to comment on this step.
Inputs & data
Outcome Y, binary treatment D, covariates X — plus the grouping variable(s) you want effects for.
Show data format & exampleHide example
Format — one row per unit: y, d ∈ {0,1}, covariates X.
y d age inc educ
1.2 1 41 38k 13
-0.3 0 53 21k 11
Figures reproduced from DoubleML — Bach, Chernozhukov, Kurz & Spindler — unofficial community showcase; all credit to the original authors.
⚠️ Unofficial community showcase of a DoubleML example. Not affiliated with the authors; figures are from the public documentation. All credit to Bach, Chernozhukov, Kurz & Spindler.
Slice the average effect: Group Average Treatment Effects and a CATE surface from a debiased IRM, with simultaneous confidence bands.
Discuss the workflow (0)
Log in to join the discussion.