@grf
Unofficial community showcase of the grf package by grf-labs. Not affiliated with the authors — all figures and credit belong to them. Source: github.com/grf-labs/grf
Workflows
Qini curves: automatic cost-benefit analysis
From CATEs to a budgeted treatment policy: causal forest → DR scores → cost matrix → maq Qini curve → pick the budget.
Smooth signals with a local linear forest
When the conditional mean is smooth: regression forest baseline → ll_regression_forest → tuning → diagnostics.
Cross-fold validation of heterogeneity
K-fold cross-fitted CATEs → RATE on out-of-fold priorities → honest verdict on heterogeneity strength.
Evaluating a causal forest fit
Did the forest actually capture treatment-effect heterogeneity? Calibration → variable importance → BLP → omnibus tests.
An introduction to GRF (getting started)
A minimal first-contact recipe: regression forest, quantile forest, and a causal forest on the same data.
Estimating ATEs on a new target population
Train a causal forest on the source sample → reweight AIPW to a target population → report transported ATE.
Policy learning via optimal decision trees
Causal forest → doubly-robust scores → policytree → evaluate policy value → plot the tree.
Causal forest with time-to-event data (survival)
Censoring check → causal survival forest → RMST-scale AIPW ATE → calibration → report.
Assessing heterogeneity with RATE (AUTOC & Qini)
Causal forest → train/eval split → RATE with both AUTOC and Qini → TOC plot.
Heterogeneous treatment effects with a causal forest (GRF recipe)
The full GRF HTE playbook: cross-fit nuisances → causal forest → calibration → AIPW ATE → BLP → RATE → policy.