Skip to main content
QUICK REVIEW

[Paper Review] Mostly Harmless Machine Learning: Learning Optimal Instruments in Linear IV Models

Jiafeng Chen, Daniel L. Chen|arXiv (Cornell University)|Nov 12, 2020
Law, Economics, and Judicial SystemsEconomics, Econometrics and Finance37 references7 citations
TL;DR

This paper proposes a user-friendly machine learning approach for linear instrumental variables (IV) estimation that improves precision and robustness by leveraging nonlinear relationships between instruments and endogenous treatments. Using sample-splitting and machine learning to predict treatment from instruments and exogenous covariates—while constraining predictions to be linear in covariates—it ensures valid identification and delivers consistent, asymptotically normal estimates with improved instrument strength.

ABSTRACT

We offer straightforward theoretical results that justify incorporating machine learning in the standard linear instrumental variable setting. The key idea is to use machine learning, combined with sample-splitting, to predict the treatment variable from the instrument and any exogenous covariates, and then use this predicted treatment and the covariates as technical instruments to recover the coefficients in the second-stage. This allows the researcher to extract non-linear co-variation between the treatment and instrument that may dramatically improve estimation precision and robustness by boosting instrument strength. Importantly, we constrain the machine-learned predictions to be linear in the exogenous covariates, thus avoiding spurious identification arising from non-linear relationships between the treatment and the covariates. We show that this approach delivers consistent and asymptotically normal estimates under weak conditions and that it may be adapted to be semiparametrically efficient (Chamberlain, 1992). Our method preserves standard intuitions and interpretations of linear instrumental variable methods, including under weak identification, and provides a simple, user-friendly upgrade to the applied economics toolbox. We illustrate our method with an example in law and criminal justice, examining the causal effect of appellate court reversals on district court sentencing decisions.

Motivation & Objective

  • To address the limitation of traditional two-stage least squares (TSLS) in linear IV models, which only exploits linear relationships between instruments and endogenous variables, leading to poor precision when instruments are weak.
  • To develop a method that leverages machine learning to extract nonlinear variation from instruments without introducing spurious identification from nonlinear transformations of exogenous covariates.
  • To preserve standard IV interpretations and inference tools—such as Anderson–Rubin and Wald confidence intervals—while incorporating flexible first-stage predictions.
  • To demonstrate that machine learning in the first stage can strengthen weak instruments and improve estimation efficiency, even in high-dimensional or complex data settings.
  • To provide a practical, semiparametrically efficient, and user-friendly upgrade to the applied econometrics toolkit that maintains interpretability and robustness.

Proposed method

  • Use sample-splitting to separate the first stage (instrument prediction) from the second stage (structural estimation), ensuring valid inference.
  • Apply off-the-shelf machine learning models (e.g., LightGBM, Random Forest) to predict the endogenous treatment from instruments and exogenous covariates in the first stage.
  • Constrain the machine learning predictions to be linear in the exogenous covariates, preventing spurious identification from nonlinearities in the covariates.
  • Use the predicted treatment and exogenous covariates as technical instruments in the second stage, preserving the linear IV framework.
  • Ensure asymptotic normality and consistency under weak conditions, including consistency of the first-stage prediction.
  • Adapt the method to be semiparametrically efficient by leveraging the optimal estimating equation framework (Chamberlain, 1992).

Experimental results

Research questions

  • RQ1Can machine learning be used to extract nonlinear variation from instruments in linear IV models without invalidating identification?
  • RQ2Does incorporating flexible first-stage predictions improve estimation precision and robustness compared to traditional linear or quadratic TSLS?
  • RQ3Can the method maintain valid inference tools like Anderson–Rubin and Wald confidence intervals despite using machine learning in the first stage?
  • RQ4How does the method perform in the presence of weak instruments, particularly when traditional TSLS fails due to low F-statistics?
  • RQ5To what extent can machine learning rescue weak instruments by enhancing their predictive power on the endogenous treatment?

Key findings

  • The MLSS estimator delivers consistent and asymptotically normal estimates under weak conditions, even when the first-stage prediction is flexible.
  • The method successfully extracts nonlinear variation from instruments, improving instrument strength and reducing standard errors compared to linear or quadratic TSLS.
  • In the empirical application on appellate court reversals, the MLSS estimator produced tighter confidence intervals than linear TSLS, which had an F-statistic of only 1.5 and a wide Anderson–Rubin interval of [-3.3, 23.8].
  • Quadratic TSLS produced an empty Anderson–Rubin interval due to model misspecification, while MLSS estimators (e.g., LightGBM, RandomForest) avoided this issue and provided non-empty, precise intervals.
  • Split-sample estimators using polynomial expansions performed poorly, with out-of-sample R² near zero and highly variable point estimates across splits, unlike MLSS.
  • The method ensures that the second-stage estimation remains just-identified and avoids empty confidence sets by design, even under heterogeneous treatment effects.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.