Skip to main content
Log in

How he won: Using machine learning to understand Trump’s 2016 victory

  • Research Article
  • Published:
Journal of Computational Social Science Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

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

  1. Dummy variables such as sex were kept as is, since their scaling is already amenable to comparison.

  2. https://github.com/kperkins411/VoterAnalysis.

  3. Unfortunately, this analysis is only possible for the general elections, as primary data from 2012 was not available in the CCES.

  4. fitting our model using only the training data, then making predictions using both the training and the test data.

  5. 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].

  6. 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

  1. Alkon, M. (2017). Local sociotropism: How community variation in trade exposure affects voter demands. ssrn. Social Science Research Network.

  2. 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.

  3. 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.

  4. Bisbee, J. (2020). Free Trade and American Politics: Essays on the Domestic Political Economy of Free Trade. Ph. D. thesis, New York University.

  5. Bor, J. (2017). Diverging life expectancies and voting patterns in the 2016 us presidential election. American Journal of Public Health, 107(10), 1560–1562.

    Article  Google Scholar 

  6. Breiman, L. (2001). Random forests. Machine Learning, 45(1), 5–32.

    Article  Google Scholar 

  7. Broughton, C. (2014). Boom, bust, exodus: the rust belt, the Maquilas, and a tale of two cities. Oxford University Press.

    Google Scholar 

  8. DeSante, C.D., & Smith, C.W. (2016). The two dimensions of whites racial attitudes, or: The new new racism. Technical report, Working paper.

  9. 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.

    Article  Google Scholar 

  10. 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.

    Article  Google Scholar 

  11. Hendrickson, C., Muro, M., & Galston, W.A. (2018). Countering the geography of discontent: Strategies for left-behind places. Brookings, November.

  12. Hill, D. W., & Jones, Z. M. (2014). An empirical evaluation of explanations for state repression. American Political Science Review, 108(3), 661–687.

    Article  Google Scholar 

  13. 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.

    Article  Google Scholar 

  14. Jardina, A. (2019). White identity politics. Cambridge University Press.

    Book  Google Scholar 

  15. 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.

    Article  Google Scholar 

  16. 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.

    Article  Google Scholar 

  17. 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.

  18. Montgomery, J. M., & Olivella, S. (2018). Tree-based models for political science data. American Journal of Political Science, 62(3), 729–744.

    Article  Google Scholar 

  19. 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.

    Article  Google Scholar 

  20. 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.

    Article  Google Scholar 

  21. Oster, E. (2018). Diabetes and diet: Purchasing behavior change in response to health information. American Economic Journal: Applied Economics, 10(4), 308–48.

    Google Scholar 

  22. Pierce, J. R., & Schott, P. K. (2020). Trade liberalization and mortality: Evidence from US counties. American Economic Review: Insights, 2(1), 47–64.

    Google Scholar 

  23. Rickard, S. J. (2020). Economic geography, politics, and policy. Annual Review of Political Science, 23, 187–202.

    Article  Google Scholar 

  24. 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.

  25. 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.

  26. 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.

    Article  Google Scholar 

  27. Tharwat, A. (2020). Classification assessment methods. Applied Computing and Informatics.

  28. 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.

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zhaochen He.

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.

Supplementary file1 (PDF 1279 KB)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s42001-021-00147-3

Keywords

Navigation