σ StatsDoge Causal inference workflows
8
Workflow·4 steps·branched

Distributional effects: potential quantiles & CVaR (DoubleML)

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

When the tails matter: estimate potential quantiles and the conditional value-at-risk of a treatment with Neyman-orthogonal scores.

1

Input · what goes in

Outcome Y, binary treatment D, covariates X — when you care about quantiles / tail risk, not the mean.

Show data format & exampleHide example

Format — one row per unit: y, d ∈ {0,1}, covariates X.

  y     d    x1    x2
 0.4    1   0.4  -1.1
-1.1    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
Data prep

Build DoubleMLData (y, d, X)

Data preparation — shapes the raw inputs into what the estimator expects.

What happens here

Declare outcome, binary treatment and covariates.

Reads from the input data Feeds into the final output
Key code
dml_data = dml.DoubleMLData(df, 'y', 'd', x_cols=X)
Discussion on this step (0)
  • No comments on this step yet — be the first.
2
Estimation

Potential quantiles

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

What happens here

A debiased τ-quantile of each potential outcome.

Formula
heta_ au(d)=F^{-1}_{Y(d)}( au)=\inf\{y:F_{Y(d)}(y)\ge au\}
Reads from the input data Feeds into the final output
Key code
pq = dml.DoubleMLPQ(dml_data, ml_g, ml_m, quantile=0.5).fit()

Reference / docs ↗

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

Conditional value-at-risk

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

What happens here

Average outcome in the lower tail below the τ-quantile — orthogonally identified.

Formula
\mathrm{CVaR}_ au(d)=\mathbb{E}\!\left[\,Y(d)\mid Y(d)\le F^{-1}_{Y(d)}( au)\, ight]
Reads from the input data Feeds into the final output
Key code
cvar = dml.DoubleMLCVAR(dml_data, ml_g, ml_m, quantile=0.1).fit()

Reference / docs ↗

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

Plot quantile & CVaR effects

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

What happens here

Effect across the distribution and in the tail.

Reads from the input data Feeds into the final output
Key code
# quantile/CVaR effect vs tau, with CIs
Discussion on this step (0)
  • No comments on this step yet — be the first.
3

Output · what you get 4 figures

Potential quantiles of the outcome under treatment vs control.
Fig 1Potential quantiles of the outcome under treatment vs control.
Quantile effects across the distribution, with confidence intervals.
Fig 2Quantile effects across the distribution, with confidence intervals.
Conditional value-at-risk (CVaR) of the potential outcomes.
Fig 3Conditional value-at-risk (CVaR) of the potential outcomes.
CVaR effects — the treatment's impact on tail risk.
Fig 4CVaR effects — the treatment's impact on tail risk.

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.

When the tails matter: estimate potential quantiles and the conditional value-at-risk of a treatment with Neyman-orthogonal scores.

Discussion (0)

  • No comments yet — start the conversation.