TL;DR
Economists have long built models to estimate causal effects and structural parameters, and they judge those models by the properties of their estimators. Machine learning methods are built to predict well out of sample, and they usually come without formal guarantees of that kind. Athey and Imbens argue that economists should learn these tools anyway, and they show how to use them. The key moves are to state whether the goal is prediction or a causal parameter, to choose penalties and tuning parameters by out-of-sample validation, to select covariates with the treatment in mind, and to estimate nuisance parameters with cross-fitting so that a confidence interval for a causal effect remains valid.
Builds on: Lasso Regression, Random Forest, Cross-Validation, Causal Inference · Leads to: the double machine learning and causal forest methods that apply these ideas to treatment effects in later work
Why it mattered
Economic data are increasingly large, with many variables per unit and many units, and in such settings the flexible prediction tools of machine learning often work better than classical regression. The paper is a guide written for economists who want to know which tools to add to a graduate econometrics course. Its authors argue that the methods belong in the core graduate econometrics courses, so that economists can do more sophisticated empirical work and communicate with researchers who use these methods.
The paper is also a statement about culture. It draws on Breiman's contrast between data models, where the analyst assumes a stochastic model generated the data, and algorithmic models, which treat the data mechanism as unknown. Breiman argued that statistics should adopt algorithmic tools more widely, and the authors make the same argument for economics. They are careful to add that the tools have to be adapted, not used off the shelf, when the question is causal.
The problem
Econometrics and machine learning have different goals, and that is the source of the tension the paper addresses. In econometrics, the target is an estimand, such as a treatment effect or an elasticity, and the focus is on the quality of the estimator for that target, usually measured by large-sample efficiency and confidence intervals. In machine learning, the target is usually a prediction for a new unit, judged by its error on data the model has not seen.
Least squares illustrates the difference. If the true model is linear with normal errors, least squares is unbiased, efficient, and has standard errors. But if predicting a new unit is the goal, least squares can be beaten. With three or more regressors, least squares is not admissible: other estimators dominate it, meaning they have at least as low expected squared error for every parameter value, and a lower one for some. Those estimators shrink the coefficients toward zero, which is the opposite of what least squares does.
A second problem is that the flexible methods do not come with the formal results econometricians expect. The authors note that there are no results showing that deep learning is uniformly superior to regression trees or random forests for prediction, and that such results may never arrive. They do not conclude that the methods should be dismissed. They conclude that the goal of the analysis should be stated first, and the method chosen to fit it.
How it works
The paper is a review rather than a single method, so its workflow is a sequence of decisions that an economist makes when using these tools. The sequence follows the paper's own order of argument.
flowchart TD
A["State the goal: prediction or a causal parameter"] --> B["Choose a model class and a penalty"]
B --> C["Pick the penalty and tuning by out-of-sample validation"]
C --> D{"Is the target a causal parameter?"}
D -->|"no"| E["Use the predictive model and report its out-of-sample fit"]
D -->|"yes"| F["Select covariates for both outcome and treatment"]
F --> G["Estimate nuisance functions with cross-fitting"]
G --> H["Form an orthogonal score and average it for the estimate"]
Here is a tiny instance of step 2 and step 3, traced by hand. A single regressor has three observations, , and an outcome , so the true slope is 3 and the fit is exact. Ridge regression adds a penalty to the squared errors, which shrinks the slope toward zero.
- Least squares. The slope that minimizes the squared errors is . Check: the fit is exact, so any penalty will move the slope away from the truth.
- Ridge with . The penalized slope is . Check: the penalty halves the slope, which is the shrinkage the paper describes.
- Ridge with . The slope is . Check: a bigger penalty shrinks more. The question is which penalty predicts new units best.
- Choose by validation. Set aside one observation, fit on the other two, and predict the held-out point. Repeat for each point, and choose the with the smallest total prediction error. Check: the choice uses only out-of-sample errors, so it never rewards a fit to the data it was made from.
For a causal question, the workflow adds two steps. The covariates are selected to predict both the outcome and the treatment, because a confounder that predicts treatment but barely predicts the outcome still biases the estimate. The nuisance functions, meaning the outcome and treatment models, are then estimated on other folds of the data, which is cross-fitting, so that no unit's own outcome helps predict its own nuisance value.
The math
Step 1 in symbols: the least squares problem. With centred and standardized covariates, the linear predictor is , and least squares chooses to minimize . The paper notes that with regressors this estimator is dominated by estimators that shrink toward zero.
Step 2 in symbols: the penalty. Ridge adds to the same sum, and lasso adds . For a single regressor with and the sufficient statistics, ridge gives
which matches the tiny example: .
Step 3 in symbols: the Bayesian reading. If the errors have variance and each coefficient has a normal prior with mean zero and variance , the posterior mean minimizes the same objective with . The paper's point is that is then a prior choice, and the machine learning approach instead chooses by out-of-sample cross-validation, which is empirical rather than subjective.
Step 4 in symbols: sparsity. The lasso uses in the penalty , and ridge uses . The lasso can set coefficients exactly to zero, and ridge cannot. Best subset selection corresponds to , and it is computationally hard for large problems.
Step 5 in symbols: a regression tree split. A tree splits on covariate at threshold . Before the split the sum of squared errors is , and after the split it is
where and are the means of the two sides. The tree chooses the split that reduces the most. A random forest averages many trees grown on resampled data.
Step 6 in symbols: the average treatment effect. Under unconfoundedness, the treatment is independent of the potential outcomes given the covariates . The average treatment effect is , and it can be written in three ways: as the difference of conditional mean functions , as a weighted average using the propensity score , or through the influence function
The estimate is the sample average of with estimated nuisance functions plugged in.
Step 7 in symbols: why orthogonalization works. The paper shows that the estimator is efficient when the product of the two nuisance errors is small relative to the root- rate,
So each nuisance function can converge at a rate near , which is much slower than the estimate itself, and the estimator still behaves well. Errors in the nuisance functions enter only through this product.
Worked examples
Use and .
- The sum .
- The sum .
- Least squares slope: .
- Ridge slope with : .
- Interpretation: the penalty halves the slope. A larger shrinks it further, and cross-validation decides how much shrinkage predicts best.
A researcher has a confounder that predicts treatment strongly, and an outcome that barely depends on it. A lasso selects covariates by predicting the outcome.
- The lasso keeps only covariates that predict the outcome well, so is dropped.
- Because drives treatment, dropping it leaves the treated and control groups unbalanced on .
- The bias in the treatment effect is then roughly the imbalance times the effect of on the outcome, which can be large even when predicts the outcome only modestly.
- Selecting covariates that predict the outcome or the treatment, as the paper proposes, keeps in the model.
- Interpretation: the variables that matter for prediction are not necessarily the ones that matter for a causal estimate.
A researcher estimates the nuisance functions with a random forest and wants a valid confidence interval for the average effect.
- Random forests provide out-of-bag predictions, which for each unit come from trees that did not use that unit. The paper notes that these predictions are straightforward to obtain from random forests, and they keep the nuisance estimates free of each unit's own outcome.
- If the researcher uses a different learner, such as boosting, the data are split into folds, the nuisance functions are fitted on all but one fold, and they predict the held-out fold.
- The orthogonal score is then computed for every unit using its own cross-fitted predictions.
- The average of the scores estimates the effect, and its variance is estimated from the scores.
- Interpretation: because no unit's own outcome helped fit the nuisance value used for that unit, overfitting does not inflate the estimated effect.
Try it: with 5 folds and 500 units, how many units are in each held-out fold? Answer: units per fold, and the nuisance model for each fold is fitted on the remaining 400.
Results
The paper's content is a set of arguments and examples, not experiments of its own, so its quantitative claims are the theoretical rates and the properties it reports for estimators from the literature.
Predictive problems. The paper argues that some substantive problems are naturally prediction problems, where a test-set fit is enough. In other cases the prediction is an input to a second analysis, and convergence rates matter more than inference on the prediction itself.
Causal problems. For average treatment effects under unconfoundedness, the paper reports that doubly robust and balancing methods combine outcome modelling with weighting, and that they are less sensitive to a single misspecified model. Covariate selection that targets both outcome and treatment improves the estimator, as shown by Belloni and colleagues.
Orthogonalization and cross-fitting. The paper argues that these two ideas make estimators based on machine learning nuisance functions efficient under the product-rate condition, and they reduce overfitting that a flexible model would otherwise introduce.
Heterogeneous effects, bandits and matrix completion. The paper covers the estimation of effects that vary across individuals, the use of bandits for experiments run online, and matrix completion for panel data and consumer choice. Each is presented as a method that exploits the structure of an economic problem.
Limits. The paper states several limits itself. There are no formal results that show a particular machine learning method is uniformly best for prediction. Off-the-shelf methods often need tuning and adaptation to the problem's structure. Methods that cannot produce valid confidence intervals should not be dismissed out of hand, but the researcher has to say when that matters. Finally, the loss of predictive power is sometimes accepted in exchange for a causal estimate, as in instrumental variables, so the goal decides what counts as good performance.
Reading guide
- Section 1, introduction. The contrast between data models and algorithmic models, and the list of topics. Needs Linear Regression for the classical baseline.
- Section 2.1 and 2.2, goals and terminology. The estimand framing and the least squares example. Needs Average Treatment Effect for the estimand idea.
- Section 2.3 and 2.4, validation and regularization. Cross-validation, the Bayesian reading of the penalty, and the role of the tuning parameter. Needs Cross-Validation, Penalized Least Squares and Bias-Variance Tradeoff.
- Section 2.5 to 2.8, sparsity, computation, ensembles and inference. Needs Lasso Regression and Random Forest.
- Section 3, supervised learning for regression. Lasso and elastic nets, regression trees and forests, neural networks and boosting. Needs Regularization and Variable Selection via the Elastic Net, Decision Tree and Gradient Boosting.
- Section 4 and 5, classification and unsupervised learning. Needs Logistic Regression and K-Means Clustering.
- Section 6, causal inference. The average treatment effect, orthogonalization and cross-fitting, and heterogeneous effects. Needs Unconfoundedness, Propensity Score, Inverse Probability Weighting, Cross-Fitting and Heterogeneous Treatment Effects.
- Section 7 and 8, experiments and matrix completion. Needs Multi-Armed Bandit and Matrix Completion Methods for Causal Panel Data Models.
- Section 9, text analysis. Needs Text as Data: The Promise and Pitfalls of Automatic Content Analysis for the broader setting.
Check yourself
QuestionRecall: how does the paper say the goal of econometrics differs from the goal of machine learning?Show answer
QuestionCompute: with and , what is the ridge slope with , and what is the least squares slope?Show answer
QuestionWhy: why does the paper say that choosing covariates by predicting the outcome alone can produce a biased treatment effect?Show answer
QuestionApplied: a colleague plugs random forest predictions of the propensity score into the average-effect formula and reports a standard error from the sample variance. What should you advise?Show answer
Sources
- Athey, S., Imbens, G. (2019). Machine Learning Methods That Economists Should Know About. arXiv:1903.10075. arxiv.org/abs/1903.10075
- DOI: doi.org/10.48550/arXiv.1903.10075
- Background: Machine learning (Wikipedia)