This article is curated for economists interested in using machine learning (ML) for their research and applications and data scientists who want to apply their tools for economics analysis.
Recently, I attended American Economic Association’s continuing education session on Machine Learning and Big Data by Melissa Dell (Harvard University) and Matthew Harding (UC Irvine) at ASSA 2023 annual meeting — the biggest gathering of social scientists.
In this short article, I have summarized the key lessons learned from those sessions and a short review of selected papers published in the top economics journal that uses ML.
Note: The article is rather suggestive than explanatory, and it is categorized into three main sections — each of which focuses on one key question:
- When ML is useful in economics?
- Which ML models are recommended?
- How to use ML for your economic applications?
We end the blog with a discussion on the limitations of ML in its current form. Along the way, I will also provide links to useful resources.
Both Melissa and Matthew, in their course, argued the following three cases where the ML models could add value for economics analysis.
1. To process non-traditional data, such as images, texts, etc.
Non-traditional data, such as images, texts, audio and videos, are hard to process using traditional econometric models; therefore, ML could be used to extract useful information in those cases.
For instance, in Hansen et al. (2018), published in QJE, the authors answer how transparency affects monetary policymakers’ deliberations using NLP data and ML algorithms. Similarly, Larsen et al. (2021), published in JME, use large news corpus and ML algorithms to investigate the role played by the media in the expectations formation process of households.
2. To capture nonlinearity which is difficult using traditional models
The ML could be useful if the data and application contain strong nonlinearity, which is hard to capture using traditional approaches.
For instance, in Maliar et al. (2021), published in JME, the authors use ML to solve a dynamic economic model by casting them into a set of nonlinear regression equations. Similarly, in Kleinberg et al. (2018), published in QJE, the authors evaluate if ML can improve judges’ decisions on bail or no bail. Although the outcome is binary, this is a highly complex problem that demands processing complex data to make prudent decisions.
3. To process traditional data at scale to improve prediction accuracy or extract new information
ML could be useful for processing large and complex (big) data with many variables. The ML models can help: 1. to improve prediction accuracy, 2. to extract new information or 3. to automate feature extraction.
Bianchi et al. (2022), published in AER, show that ML can be productively deployed in a data-rich environment to correct errors in human judgment in survey response and improve predictive accuracy. Similarly, in Bandiera et al. (2020), published in JPE, the authors measure CEO behaviour using high-frequency, high-dimensional diary data and an ML algorithm. Finally, in Farbmacher et al. (2020), published in JoE, the author uses ML for fraud detection in insurance claims using highly unstructured data.
ML is probably not useful for the cases where data complexity (which could be related to shape, size, collinearity, nonlinearity, etc.) is small, and traditional econometric models would likely suffice. However, if the data complexity increases, i.e., when dealing with big data, the value added by ML models could be higher (as shown in the chart above).
1. When dealing with text data, the “transformer” model is useful
Many large language models could be used to process text data; however, transformer models are proven more useful. There are various resources to learn about them, including this Coursera course by Andrew Ng, and I also found this Medium article helpful.
2. When dealing with images, the “ConvNext” model is useful
Many CNN architectures can be employed to process images, but the ConvNext model has proven to be more successful. Again, you can read this paper for a detailed explanation of the model and this Medium article for intuitive understanding.
3. When dealing with traditional data in economics, the “ensemble learning” models are useful
Ensemble learning models could be useful if the data size is small but includes many features and if there is collinearity or nonlinearity, which is hard to capture. There are many resources to learn about these models, including this Coursera course and this Medium article.
4. In modelling strategic decisions “reinforcement learning” is useful
RL could be useful if the primary objective is to model complex strategic decisions in economic applications where only partial information is observable. However, this is at an early stage, and there are only a few applications in economics where it can be used — for example, the AI economist paper and an application in payments. You can learn more about RL in this Book by Sutton and Barto and this Coursera course.
5. When the focus is on causal inference, “causal ML” can help
The causal ML could be helpful when the primary objective is to make causal inferences, but the dataset is big and complex. This is an emerging area of research; however, you can look into this Stanford course and a research paper by Susan Athey to learn more. For intuitive understanding without too many technical details, check out this Medium article.