Skip to content
StatsOtter A workspace for causal thinking
Method library WORKFLOW / 013
Research workflow/5 steps

Smooth signals with a local linear forest

Source grf — Athey, Tibshirani & Wager
01
The method workspace

Follow the analysis.

Select a node to explore the method

Method mapInput → 5 steps → output
START WITHInput data
ARRIVE ATResults
Read step 01
Inside the methodReasoning, equations & implementation
Step 1 of 5
01
Estimation

[GRF] Regression forest

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

What happens here

Baseline E[Y|X] fit — establish the score to beat.

Formula
\hat\mu(x)=\mathbb{E}\!\left[\,Y\mid X=x\,\right]
The estimator

Regression forest — Honest non-parametric regression for E[Y|X], with out-of-bag predictions and pointwise CIs.

Reads fromNot specified Feeds into#5
Key code
rf <- regression_forest(X, Y)
Y.hat <- predict(rf)$predictions
Discussion on this step (0)
StatsOtterDiscussion starter · Editorial note

Before using this step, make its assumptions and its output explicit. A useful peer note explains what you would check, what could go wrong, or what would change your interpretation.

Questions to explore
  1. Which assumption matters most here, and what evidence could challenge it?
  2. What would you check before passing this output to the next step?

Peer discussion

  • Bring your experience, a question, or a different perspective.
02
Data contract

Inputs & data

Outcome Y with a smooth dependence on continuous covariates X.

Show data format & exampleHide example

Format — one row per unit. A covariate matrix X and an outcome Y (no treatment needed).

  X1     X2    X3     Y
 0.42  -1.1   0.2   3.10
-0.07   0.6  -0.5   1.85
 1.20   0.3   0.1   4.02
03
Read the evidence

Results & interpretation

5 figures Workflow discussion 0
01FigureA plain regression forest fit vs the smooth truth — note the bias along the trend.
02FigureThe local linear forest tracks the same smooth signal far more closely.
03FigureLocal linear forest fit with 95% confidence bands.
04FigureSplit-frequency heatmap for the regression forest.
05FigureSplit-frequency heatmap for the local linear forest — splits concentrate where the signal bends.

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

Context & interpretation

The GRF 'Local linear forests' tutorial. The plain forest can show staircase artifacts near boundaries and on smooth signals; the local linear correction smooths these out and improves extrapolation. Unofficial summary.

Peer notes

Discuss the workflow (0)

  • No comments yet — start the conversation.
IN THE MARGINS

Peer discussion