σ StatsDoge Causal inference workflows
16
σ Building block · used in 8 workflows

Causal forest

CATE Causal ForestDoubly RobustHeterogeneous EffectsMachine Learning
Source grf — Athey, Tibshirani & Wager
Summary by StatsDoge

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

You're looking at a building block — one of the estimators a workflow uses inside its pipeline. You reached it from a workflow step; it's used in 8 workflows (listed below).

Out-of-bag CATE distribution from a causal forest

Figure: Out-of-bag CATE distribution from a causal forest. Source — grf-labs docs.

⚠️ Unofficial community write-up of a method from grf-labs/grf (pinned at v2.6.1). Not affiliated with the grf-labs authors — this summarizes the public documentation for demonstration. All credit & copyright belong to the original authors (Athey, Tibshirani, Wager, et al.).

What it does

Estimates the conditional average treatment effect τ(x) = E[Y(1) − Y(0) | X = x] for a binary treatment, by growing a forest whose splits maximize heterogeneity in treatment effect rather than in the outcome.

How GRF makes it work

  • Orthogonalization (R-learner style): first fit Y.hat = E[Y|X] and W.hat = E[W|X] (e.g. with regression_forest), then split on the residualized moment condition. This removes confounding from nuisance variation.
  • Honesty: one subsample picks the splits, a disjoint subsample fills the leaves — so predictions are (nearly) unbiased and you get valid pointwise confidence intervals.
  • Adaptive neighborhoods: the forest defines data-driven weights α_i(x); τ(x) solves a locally-weighted estimating equation.
library(grf)
cf <- causal_forest(X, Y, W)            # W.hat, Y.hat cross-fit internally
tau.hat <- predict(cf)$predictions       # OOB CATE
predict(cf, X.test, estimate.variance = TRUE)

Pairs with

average_treatment_effect() (AIPW ATE), test_calibration(), best_linear_projection(), rank_average_treatment_effect() and policytree for targeting.

Assumptions

  • Unconfoundedness given X · Overlap · SUTVA. Honest CIs are asymptotic.

Used in these workflows (8)

Discussion (4)

  • 5

    The orthogonalization step is what sold me — residualizing on Y.hat/W.hat before splitting kills so much confounding bias. Textbook R-learner.

    3

    Exactly. And cross-fitting the nuisances means you're not paying an overfitting tax on the moment condition.

  • 4

    Reminder for newcomers: always run test_calibration() before you believe the heterogeneity. A great-looking CATE histogram can still fail the differential-forest coefficient.

  • 6

    Honesty costs you some efficiency but the valid CIs are worth it. Don't turn it off just to make the intervals tighter.

    4

    Co-signed. Honesty is a feature, not a bug.

  • 2

    Underrated that the same object gives you doubly-robust ATEs via average_treatment_effect(). One fit, point + interval.