Search arXivSearch

arXiv · 2505.13422

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

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Connor Lennon, Edward Rubin, Glen Waddell. 2025-05-19. Machine learning the first stage in 2SLS: Practical guidance from bias decomposition and simulation. https://arxiv.org/abs/2505.13422

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Testing for Monotone Equilibrium Strategies in Games of Incomplete Information

This paper develops a unified framework for testing monotonicity of Bayesian Nash equilibrium strategies in unobserved types in games of incomplete information. We show that, under symmetric independent private types, monotonicity of differentiable equilibrium strategies is equivalent to monotonicity of a quasi-inverse strategy identified from observed actions. This allows the problem to be reformulated as testing a countable set of moment inequalities involving unconditional expectations. We propose a Cramer-von Mises-type statistic with bootstrap critical values. The method accommodates covariates and game heterogeneity. Monte Carlo simulations demonstrate finite-sample performance, and an application to procurement auctions illustrates cartel detection.

econ.EM

Ordinal Distributional Change and Conservative Transition Benchmarks: Measurement, Identification, and Inference

Repeated cross-sections reveal changes in ordinal distributions but not the transitions producing them. I axiomatically characterize a threshold-weighted probability metric for ordinal change from threshold-crossing principles. For any threshold-additive ordinal geometry, the discrepancy coincides with the Wasserstein--1 distance induced by that ground metric and measures minimum displacement; its optimizing plans define conservative transition benchmarks. With missing outcomes, I derive sharp identified sets for the discrepancy and endpoint-conditioned benchmark plans. I develop finite-sample-valid projection inference using randomized Monte Carlo calibration and global search with an almost-sure convergence guarantee. Applied to Arab Barometer data, the framework documents a robust shift toward broader and more regular remittance receipt in Lebanon. The discrepancy interval remains well separated from zero after allowing for item nonresponse and sampling uncertainty, while benchmark bounds provide strong numerical evidence that least-displacement restructuring excludes movement toward less frequent receipt and requires reassignment from nonreceipt to recurrent receipt.

econ.EM

A Stochastic Nested Fixed Point Algorithm for Large-Scale BLP Estimation

We develop a stochastic nested fixed point (SNFP) estimator for random coefficients logit demand models that updates model parameters using stochastic gradients and performs demand inversion one market at a time. Relative to the conventional nested fixed point (NFP) estimator, SNFP substantially reduces memory requirements and computational cost, making estimation feasible in very large datasets. We establish the large-$T$ (number of markets) asymptotic properties of the estimator under regularity conditions. We also characterize the effect of sharing one block of simulation draws across markets and show how to correct for it. Monte Carlo simulations show that the SNFP estimator achieves statistical accuracy comparable to the NFP estimator, and in our benchmark a single online pass estimates a model with 100 million markets in about 5.5 hours. An empirical application using scanner data further demonstrates the practical advantages of SNFP for large-scale demand estimation.

econ.EM