σ StatsDoge Causal inference workflows
8
Workflow·3 steps

Estimating ATEs on a new target population

Source grf — Athey, Tibshirani & Wager
Summary by StatsDoge

Train a causal forest on the source sample → reweight AIPW to a target population → report transported ATE.

1

Input · what goes in

A source RCT (X, W, Y) and a target population's covariates X_test.

Show data format & exampleHide example

Format — one row per unit. A covariate matrix X (numeric), a binary treatment W ∈ {0,1}, and an outcome Y.

  X1     X2    X3    W    Y
 0.42  -1.1   0     1   3.10
-0.07   0.6   1     0   1.85
 1.20   0.3   0     1   4.02
2

Pipeline · the recipe

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

1
Estimation

[GRF] Causal forest

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

What happens here

Fit on the source sample where treatment varies.

Formula
au(x)=\mathbb{E}\!\left[\,Y(1)-Y(0)\mid X=x\, ight]
The estimator

Causal forest — Honest random forest for heterogeneous treatment effects — CATE for a binary treatment via GRF moment conditions.

Reads from the input data Feeds into #2
Key code
cf <- causal_forest(X, Y, W)          # Y.hat, W.hat cross-fit
tau.hat <- predict(cf)$predictions    # OOB CATEs
Discussion on this step (0)
  • No comments on this step yet — be the first.
2
Inference

[GRF] AIPW average treatment effect

Uncertainty quantification — standard errors, intervals, and aggregation.

What happens here

Reweight AIPW scores to the target covariate distribution (target.sample / target.weights).

Formula
\hat au= frac1n extstyle\sum_i\hat\Gamma_i,\ \ \hat\Gamma_i=\hat\mu_1(X_i)-\hat\mu_0(X_i)+ frac{W_i(Y_i-\hat\mu_1)}{\hat e(X_i)}- frac{(1-W_i)(Y_i-\hat\mu_0)}{1-\hat e(X_i)}
The estimator

AIPW average treatment effect — Doubly-robust ATE / ATT / ATC / overlap-weighted effect from a trained causal forest, via augmented IPW.

Reads from #1 Feeds into #3
Key code
average_treatment_effect(cf, target.sample = "all")      # ATE
average_treatment_effect(cf, target.sample = "treated")  # ATT
Discussion on this step (0)
  • No comments on this step yet — be the first.
3
Reporting

Transported ATE + overlap caveats

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

What happens here

Report the target-population ATE and flag regions of thin overlap where it's extrapolating.

Reads from #2 Feeds into the final output
Discussion on this step (0)
  • No comments on this step yet — be the first.
3

Output · what you get

Effect-modifier distributions differ between the trial and the target population — exactly why the ATE has to be transported.
Fig 1Effect-modifier distributions differ between the trial and the target population — exactly why the ATE has to be transported.

Figures reproduced from grf — Athey, Tibshirani & Wager — unofficial community showcase; all credit to the original authors.

The GRF 'Estimating ATEs on a new target population' tutorial. Uses the forest's doubly-robust scores with target weights to transport the effect, and is honest about overlap. Unofficial summary.

Discussion (0)

  • No comments yet — start the conversation.