Abstract
The meaning of Donald Trump’s 2016 victory has been widely debated. Some believe that Trump’s success stemmed from the decline of manufacturing and other macroeconomic changes. Others see a political strategy that exploited antagonism towards minorities and immigrants. We put both accounts to the test. Using data from the Quarterly Workforce Indicators (QWI) program, we construct a county-level metric of job decline and pair it with a large survey of political and social opinion. Using both logistic regression and random forest classification, we then estimate the impact of economics, race, and other factors on voter choice in 2016. We also perform a “what if” analysis, predicting how the election would have proceeded had voters experienced greater economic hardship, or harbored more progressive views towards race and immigration. Overall, our research indicates that attitudes towards race and immigration played a significantly larger role in the elections than economics. However, we do find evidence that deteriorating job conditions may have exacerbated the importance of racial views.
Similar content being viewed by others
Data availability
All data used in this study is publicly available; all code and replication materials can be found at https://github.com/eastnile.
Notes
Dummy variables such as sex were kept as is, since their scaling is already amenable to comparison.
Unfortunately, this analysis is only possible for the general elections, as primary data from 2012 was not available in the CCES.
fitting our model using only the training data, then making predictions using both the training and the test data.
Not to be confused with the F-statistic. In the machine learning literature, the F1 score is a commonly used metric of model performance that, roughly speaking, incorporates both Type 1 and Type 2 error rates [27].
Nebraska and Maine use proportional representation in the electoral college instead of the winner-takes-all system used by the other states. To keep the model simple, we ignored this detail in our estimates.
References
Alkon, M. (2017). Local sociotropism: How community variation in trade exposure affects voter demands. ssrn. Social Science Research Network.
Autor, D., Dorn, D., Hanson, G., & Majlesi, K. (2016). A note on the effect of rising trade exposure on the 2016 presidential election. Unpublished manuscript.
Best, K.B., Gilligan, J.M., Baroud, H., Carrico, A.R., Donato, K.M., Ackerly, B.A., & Mallick, B. (2020). Random forest analysis of two household surveys can identify important predictors of migration in bangladesh. Journal of Computational Social Science, 1–24.
Bisbee, J. (2020). Free Trade and American Politics: Essays on the Domestic Political Economy of Free Trade. Ph. D. thesis, New York University.
Bor, J. (2017). Diverging life expectancies and voting patterns in the 2016 us presidential election. American Journal of Public Health, 107(10), 1560–1562.
Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32.
Broughton, C. (2014). Boom, bust, exodus: the rust belt, the Maquilas, and a tale of two cities. Oxford University Press.
DeSante, C.D., & Smith, C.W. (2016). The two dimensions of whites racial attitudes, or: The new new racism. Technical report, Working paper.
Goodwin, J. S., Kuo, Y.-F., Brown, D., Juurlink, D., & Raji, M. (2018). Association of chronic opioid use with presidential voting patterns in us counties in 2016. JAMA Network Open, 1(2), e180450–e180450.
Green, J., & McElwee, S. (2019). The differential effects of economic conditions and racial attitudes in the election of donald trump. Perspectives on Politics, 17(2), 358–379.
Hendrickson, C., Muro, M., & Galston, W.A. (2018). Countering the geography of discontent: Strategies for left-behind places. Brookings, November.
Hill, D. W., & Jones, Z. M. (2014). An empirical evaluation of explanations for state repression. American Political Science Review, 108(3), 661–687.
Hu, X., Zhang, X., & Lovrich, N. (2021). Public perceptions of police behavior during traffic stops: Logistic regression and machine learning approaches compared. Journal of Computational Social Science, 4(1), 355–380.
Jardina, A. (2019). White identity politics. Cambridge University Press.
Jensen, J. B., Quinn, D. P., & Weymouth, S. (2017). Winners and losers in international trade: The effects on us presidential voting. International Organization, 71(3), 423–457.
Krosch, A. R., & Amodio, D. M. (2014). Economic scarcity alters the perception of race. Proceedings of the National Academy of Sciences, 111(25), 9079–9084.
Monnat, S.M. (2016). Deaths of despair and support for trump in the 2016 presidential election. Pennsylvania State University Department of Agricultural Economics Research Brief 5, 1–9.
Montgomery, J. M., & Olivella, S. (2018). Tree-based models for political science data. American Journal of Political Science, 62(3), 729–744.
Muchlinski, D., Siroky, D., He, J., & Kocher, M. (2016). Comparing random forest with logistic regression for predicting class-imbalanced civil war onset data. Political Analysis, 24(1), 87–103.
Mutz, D. C. (2018). Status threat, not economic hardship, explains the 2016 presidential vote. Proceedings of the National Academy of Sciences, 115(19), E4330–E4339.
Oster, E. (2018). Diabetes and diet: Purchasing behavior change in response to health information. American Economic Journal: Applied Economics, 10(4), 308–48.
Pierce, J. R., & Schott, P. K. (2020). Trade liberalization and mortality: Evidence from US counties. American Economic Review: Insights, 2(1), 47–64.
Rickard, S. J. (2020). Economic geography, politics, and policy. Annual Review of Political Science, 23, 187–202.
Schaffner, B.F., MacWilliams, M., Nteta, T. (2016). Explaining white polarization in the 2016 vote for president: The sobering role of racism and sexism. In Conference on the US Elections of, pp. 8–9.
Sides, J. (2017). Race, religion, and immigration in 2016: How the debate over american identity shaped the election and what it means for a trump presidency. Insights from the 2016 VOTER Survey.
Strobl, C., Boulesteix, A.-L., Zeileis, A., & Hothorn, T. (2007). Bias in random forest variable importance measures: Illustrations, sources and a solution. BMC Bioinformatics, 8(1), 1–21.
Tharwat, A. (2020). Classification assessment methods. Applied Computing and Informatics.
Wright, M. N. & Ziegler, A. (2015). ranger: A fast implementation of random forests for high dimensional data in c++ and r. arXiv preprint arXiv:1508.04409.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
On behalf of all authors, the corresponding author states that there is no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Rights and permissions
About this article
Cite this article
He, Z., Camobreco, J. & Perkins, K. How he won: Using machine learning to understand Trump’s 2016 victory. J Comput Soc Sc 5, 905–947 (2022). https://doi.org/10.1007/s42001-021-00147-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s42001-021-00147-3