Machine learning the first stage in 2SLS: Practical guidance from bias decomposition and simulation

Connor Lennon, Edward Rubin, Glen Waddell
5/19/2025
econ.EMcs.LGstat.AP

No confident code implementation found for this paper.

Abstract

Machine learning (ML) primarily evolved to solve "prediction problems." The first stage of two-stage least squares (2SLS) is a prediction problem, suggesting potential gains from ML first-stage assistance. However, little guidance exists on when ML helps 2SLS$\unicode{x2014}$or when it hurts. We investigate the implications of inserting ML into 2SLS, decomposing the bias into three informative components. Mechanically, ML-in-2SLS procedures face issues common to prediction and causal-inference settings$\unicode{x2014}$and their interaction. Through simulation, we show linear ML methods (e.g., post-Lasso) work well, while nonlinear methods (e.g., random forests, neural nets) generate substantial bias in second-stage estimates$\unicode{x2014}$potentially exceeding the bias of endogenous OLS.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lennon2025machine,
  title  = {Machine learning the first stage in 2SLS: Practical guidance from bias decomposition and simulation},
  author = {Connor Lennon and Edward Rubin and Glen Waddell},
  year   = {2025},
  eprint = {2505.13422},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.13422v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.13422.svg)](https://codeofpaper.com/paper/2505.13422)

Discussion