σ StatsDoge Causal inference workflows
9
Workflow·3 steps·branched

Learn an interpretable treatment policy (DoubleML policy tree)

Source DoubleML — Bach, Chernozhukov, Kurz & Spindler
Summary by StatsDoge

Turn debiased CATEs into a rule: fit a shallow, readable decision tree that maximises the doubly-robust policy value.

1

Input · what goes in

Outcome Y, binary treatment D, covariates X you'd target on (and a cost, implicitly).

Show data format & exampleHide example

Format — one row per unit: y, d, targeting covariates X.

  y     d   x1    x2
 1.2    1   0.4  -1.1
-0.3    0  -0.1   0.6
2

Pipeline · the recipe ⑂ has parallel branches

↑ Click any step in the diagram to read its logic, code, assumptions & discussion.

1
Estimation

Orthogonal scores from an IRM

The core estimate — where the causal quantity itself is computed.

What happens here

Cross-fitted doubly-robust scores Γ — the reward signal for each unit.

Formula
\Gamma_i=g_1(X_i)-g_0(X_i)+\dfrac{D_i(Y_i-g_1)}{m(X_i)}-\dfrac{(1-D_i)(Y_i-g_0)}{1-m(X_i)}
Reads from the input data Feeds into the final output
Key code
dml_irm = dml.DoubleMLIRM(dml_data, ml_g, ml_m).fit()

Reference / docs ↗

Discussion on this step (0)
  • No comments on this step yet — be the first.
2
Heterogeneity

Fit a depth-limited policy tree

Heterogeneity — who is affected, and by how much, not just on average.

What happens here

Choose the rule that maximises the average doubly-robust value over a shallow tree class.

Formula
\hat\pi=\arg\max_{\pi\in\Pi}\ frac1n\sum_{i=1}^n \Gamma_iig(\pi(X_i)ig)
Reads from the input data Feeds into the final output
Key code
tree = dml_irm.policy_tree(features=X, depth=2)
tree.plot_tree()

Reference / docs ↗

Discussion on this step (0)
  • No comments on this step yet — be the first.
3
Reporting

Read the tree & its value

Reporting — turn the numbers into a figure or table a reader can act on.

What happens here

Plot the rule and report its value vs treat-all / treat-none.

Formula
V(\pi)=\mathbb{E}\!\left[\,\Gamma(\pi(X))\, ight]
Reads from the input data Feeds into the final output
Key code
# value(pi) = mean of DR scores under the learned assignment
Discussion on this step (0)
  • No comments on this step yet — be the first.
3

Output · what you get 2 figures

The learned policy: a shallow decision tree splitting units into treat / don't-treat.
Fig 1The learned policy: a shallow decision tree splitting units into treat / don't-treat.
Where the rule treats — the decision regions in covariate space.
Fig 2Where the rule treats — the decision regions in covariate space.

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.

Turn debiased CATEs into a rule: fit a shallow, readable decision tree that maximises the doubly-robust policy value.

Discussion (0)

  • No comments yet — start the conversation.