Table 2 Fallacy in Descriptive Epidemiology: Bringing Machine Learning to the Table
Abstract
:1. Introduction
1.1. Descriptive Epidemiology
1.2. Machine Learning
2. Illustrative Example
2.1. Data Description
2.2. Machine Learning Analysis
3. Results
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Fox, M.P.; Murray, E.J.; Lesko, C.R.; Sealy-Jefferson, S. On the Need to Revitalize Descriptive Epidemiology. Am. J. Epidemiol. 2022, 191, 1174–1179. [Google Scholar] [CrossRef]
- Porta, M.S.; Greenland, S.; Hernán, M.; dos Silva, I.S.; Last, J.M. A Dictionary of Epidemiology, 6th ed.; International Epidemiological Association, Ed.; Oxford University Press: Oxford, UK, 2014; 343p. [Google Scholar]
- Westreich, D.; Greenland, S. The Table 2 Fallacy: Presenting and Interpreting Confounder and Modifier Coefficients. Am. J. Epidemiol. 2013, 177, 292–298. [Google Scholar] [CrossRef] [Green Version]
- Lesko, C.R.; Fox, M.P.; Edwards, J.K. A Framework for Descriptive Epidemiology. Am. J. Epidemiol. 2022, 191, 2063–2070. [Google Scholar] [CrossRef] [PubMed]
- Kueper, J.K.; Rayner, J.; Zwarenstein, M.; Lizotte, D. Describing a complex primary health care population to support future decision support initiatives. IJPDS 2022, 7, 1756. [Google Scholar] [CrossRef]
- Bi, Q.; Goodman, K.E.; Kaminsky, J.; Lessler, J. What is Machine Learning? A Primer for the Epidemiologist. Am. J. Epidemiol. 2019, 188, kwz189. [Google Scholar] [CrossRef]
- Fu, R.; Kundu, A.; Mitsakakis, N.; Elton-Marshall, T.; Wang, W.; Hill, S.; Bondy, S.J.; Hamilton, H.; Selby, P.; Schwartz, R.; et al. Machine learning applications in tobacco research: A scoping review. Tob. Control 2023, 32, 99–109. [Google Scholar] [CrossRef] [PubMed]
- Morgenstern, J.D.; Buajitti, E.; O’Neill, M.; Piggott, T.; Goel, V.; Fridman, D.; Kornas, K.; Rosella, L.C. Predicting population health with machine learning: A scoping review. BMJ Open 2020, 10, e037860. [Google Scholar] [CrossRef]
- Sekercioglu, N.; Fu, R.; Kim, S.J.; Mitsakakis, N. Machine learning for predicting long-term kidney allograft survival: A scoping review. Ir. J. Med. Sci. 2021, 190, 807–817. [Google Scholar] [CrossRef]
- Kundu, A.; Chaiton, M.; Billington, R.; Grace, D.; Fu, R.; Logie, C.; Baskerville, B.; Yager, C.; Mitsakakis, N.; Schwartz, R. Machine Learning Applications in Mental Health and Substance Use Research Among the LGBTQ2S+ Population: Scoping Review. JMIR Med. Inform. 2021, 9, e28962. [Google Scholar] [CrossRef]
- Singh, I.; Valavil Punnapuzha, V.; Mitsakakis, N.; Fu, R.; Chaiton, M. A Machine Learning Approach Reveals Distinct Predictors of Vaping Dependence for Adolescent Daily and Non-Daily Vapers in the COVID-19 Era. Healthcare 2023, 11, 1465. [Google Scholar] [CrossRef]
- Andueza, A.; Del Arco-Osuna, M.Á.; Fornés, B.; González-Crespo, R.; Martín-Álvarez, J.M. Using the Statistical Machine Learning Models ARIMA and SARIMA to Measure the Impact of Covid-19 on Official Provincial Sales of Cigarettes in Spain. 2023. Available online: https://reunir.unir.net/handle/123456789/14295 (accessed on 15 May 2023).
- Lavelle-Hill, R.; Smith, G.; Mazumder, A.; Landman, T.; Goulding, J. Machine learning methods for “wicked” problems: Exploring the complex drivers of modern slavery. Humanit. Soc. Sci. Commun. 2021, 8, 274. [Google Scholar] [CrossRef]
- Greenwell, B.M.; Boehmke, B.C. Variable Importance Plots—An Introduction to the vip Package. R J. 2020, 12, 343–366. [Google Scholar] [CrossRef]
- Greenwell, B.M.; Boehmke, B.C.; McCarthy, A.J. A Simple and Effective Model-Based Variable Importance Measure. arXiv 2018, arXiv:1805.04755. [Google Scholar]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Green Version]
- Molnar, C. Interpretable Machine Learning: A Guide for Making Black Box Models Explainable, 2nd ed.; Molnar, C., Ed.; Christopher Molnar Publish: Munich, Germany, 2022; 318p, Available online: https://christophm.github.io/interpretable-ml-book/cite.html (accessed on 15 May 2023).
- Moallef, S.; Salway, T.; Phanuphak, N.; Kivioja, K.; Pongruengphant, S.; Hayashi, K. The relationship between sexual and gender stigma and suicide attempt and ideation among LGBTQI + populations in Thailand: Findings from a national survey. Soc. Psychiatry Psychiatr. Epidemiol. 2022, 57, 1987–1997. [Google Scholar] [CrossRef]
- Salerno, J.P.; Boekeloo, B.O. LGBTQ Identity-Related Victimization During COVID-19 Is Associated with Moderate to Severe Psychological Distress Among Young Adults. LGBT Health 2022, 9, 303–312. [Google Scholar] [CrossRef]
- VanBronkhorst, S.B.; Edwards, E.M.; Roberts, D.E.; Kist, K.; Evans, D.L.; Mohatt, J.; Blankenship, K. Suicidality Among Psychiatrically Hospitalized Lesbian, Gay, Bisexual, Transgender, Queer, and/or Questioning Youth: Risk and Protective Factors. LGBT Health 2021, 8, 395–403. [Google Scholar] [CrossRef]
- Watson, R.J.; Park, M.; Taylor, A.B.; Fish, J.N.; Corliss, H.L.; Eisenberg, M.E.; Saewyc, E.M. Associations Between Community-Level LGBTQ-Supportive Factors and Substance Use Among Sexual Minority Adolescents. LGBT Health 2020, 7, 82–89. [Google Scholar] [CrossRef] [Green Version]
- Chaiton, M.; Musani, I.; Pullman, M.; Logie, C.H.; Abramovich, A.; Grace, D.; Schwartz, R.; Baskerville, B. Access to Mental Health and Substance Use Resources for 2SLGBTQ+ Youth during the COVID-19 Pandemic. Int. J. Environ. Res. Public Health 2021, 18, 11315. [Google Scholar] [CrossRef]
- Bharat, C.; Glantz, M.D.; Aguilar-Gaxiola, S.; Alonso, J.; Bruffaerts, R.; Bunting, B.; de Almeida, J.M.; Cardoso, G.; Chardoul, S.; de Jonge, P.; et al. Development and evaluation of a risk algorithm predicting alcohol dependence after early onset of regular alcohol use. Addiction 2023, 118, 954–966. [Google Scholar] [CrossRef]
- Afzali, M.H.; Sunderland, M.; Stewart, S.; Masse, B.; Seguin, J.; Newton, N.; Teeson, M.; Conrod, P. Machine-learning prediction of adolescent alcohol use: A cross-study, cross-cultural validation. Addiction 2019, 114, 662–671. [Google Scholar] [CrossRef] [PubMed]
- Vázquez, A.L.; Domenech Rodríguez, M.M.; Barrett, T.S.; Schwartz, S.; Amador Buenabad, N.G.; Bustos Gamiño, M.N.; Guttierez Lopez, M.; Villatoro Vasquez, J.A. Innovative Identification of Substance Use Predictors: Machine Learning in a National Sample of Mexican Children. Prev. Sci. 2020, 21, 171–181. [Google Scholar] [CrossRef] [PubMed]
- Kundu, A.; Fu, R.; Grace, D.; Logie, C.; Abramovich, A.; Baskerville, B.; Yager, C.; Schwartz, R.; Mitsakakis, N.; Planinac, L.; et al. Correlates of past year suicidal thoughts among sexual and gender minority young adults: A machine learning analysis. J. Psychiatr. Res. 2022, 152, 269–277. [Google Scholar] [CrossRef]
- Kundu, A.; Fu, R.; Grace, D.; Logie, C.H.; Abramovich, A.; Baskerville, B.; Yager, C.; Schwartz, R.; Mitsakakis, N.; Planinac, L.; et al. Correlates of wanting to seek help for mental health and substance use concerns by sexual and gender minority young adults during the COVID-19 pandemic: A machine learning analysis. PLoS ONE 2022, 17, e0277438. [Google Scholar] [CrossRef]
- van Buuren, S.; Groothuis-Oudshoorn, K. Multivariate Imputation by Chained Equations in R. J. Stat. Soft 2011, 45, 1–67. [Google Scholar]
- Bishop, C.M. Information science and statistics. In Pattern Recognition and Machine Learning; Springer: New York, NY, USA, 2006; 738p. [Google Scholar]
- Mooney, S.J.; Keil, A.P.; Westreich, D.J. Thirteen Questions About Using Machine Learning in Causal Research (You Won’t Believe the Answer to Number 10!). Am. J. Epidemiol. 2021, 190, 1476–1482. [Google Scholar] [CrossRef]
- Hastie, T.; Tibshirani, R.; Friedman, J.H. The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd ed.; Springer Series in Statistics; Springer: New York, NY, USA, 2009; 745p. [Google Scholar]
- Brownlee, J. Nested Cross-Validation for Machine Learning with Python. MachineLearningMastery.com. 2020. Available online: https://machinelearningmastery.com/nested-cross-validation-for-machine-learning-with-python/ (accessed on 15 May 2023).
- Koehrsen, W. A Conceptual Explanation of Bayesian Hyperparameter Optimization for Machine Learning Towards Data Science. 2018. Available online: https://towardsdatascience.com/a-conceptual-explanation-of-bayesian-model-based-hyperparameter-optimization-for-machine-learning-b8172278050f (accessed on 15 May 2023).
- VanderWeele, T.J. On a Square-Root Transformation of the Odds Ratio for a Common Outcome. Epidemiology 2017, 28, e58–e60. [Google Scholar] [CrossRef]
- Varma, S.; Simon, R. Bias in error estimation when using cross-validation for model selection. BMC Bioinform. 2006, 7, 91. [Google Scholar] [CrossRef] [Green Version]
- Lebedeva, E. Bootstrapping Confidence Intervals: The Basics-Elizaveta Lebedeva’s Blog. 2020. Available online: https://elizavetalebedeva.com/bootstrapping-confidence-intervals-the-basics/ (accessed on 20 March 2023).
- Rousselet, G.A.; Pernet, C.R.; Wilcox, R.R. The Percentile Bootstrap: A Primer with Step-by-Step Instructions in R. Adv. Methods Pract. Psychol. Sci. 2021, 4, 2515245920911881. [Google Scholar] [CrossRef]
- Greenwell, B.M. pdp: An R Package for Constructing Partial Dependence Plots. R J. 2017, 9, 421. [Google Scholar] [CrossRef] [Green Version]
- Bauer, G.R.; Churchill, S.M.; Mahendran, M.; Walwyn, C.; Lizotte, D.; Villa-Rueda, A.A. Intersectionality in quantitative research: A systematic review of its emergence and applications of theory and methods. SSM-Popul. Health 2021, 14, 100798. [Google Scholar] [CrossRef]
- Mahendran, M.; Lizotte, D.; Bauer, G.R. Quantitative methods for descriptive intersectional analysis with binary health outcomes. SSM-Popul. Health 2022, 17, 101032. [Google Scholar] [CrossRef] [PubMed]
- Mahendran, M.; Lizotte, D.; Bauer, G.R. Describing Intersectional Health Outcomes: An Evaluation of Data Analysis Methods. Epidemiology 2022, 33, 395–405. [Google Scholar] [CrossRef] [PubMed]
- Hastie, T.; Qian, J.; Tay, K. An Introduction to ‘glmnet’. 2021. Available online: https://glmnet.stanford.edu/articles/glmnet.html (accessed on 15 May 2023).
- Kuhn, M. The Caret Package. 2019. Available online: https://topepo.github.io/caret/ (accessed on 15 May 2023).
- Fu, R.; Shi, J.; Chaiton, M.; Leventhal, A.M.; Unger, J.B.; Barrington-Trimis, J.L. A Machine Learning Approach to Identify Predictors of Frequent Vaping and Vulnerable Californian Youth Subgroups. Nicotine Tob. Res. 2022, 24, 1028–1036. [Google Scholar] [CrossRef]
- Freijeiro-González, L.; Febrero-Bande, M.; González-Manteiga, W. A Critical Review of LASSO and Its Derivatives for Variable Selection Under Dependence Among Covariates. Int. Stat. Rev. 2022, 90, 118–145. [Google Scholar] [CrossRef]
- Zou, H. The Adaptive Lasso and Its Oracle Properties. J. Am. Stat. Assoc. 2006, 101, 1418–1429. [Google Scholar] [CrossRef] [Green Version]
- Wainer, J.; Cawley, G. Nested cross-validation when selecting classifiers is overzealous for most practical applications. Expert Syst. Appl. 2021, 182, 115222. [Google Scholar] [CrossRef]
- Cawley, G.C.; Talbot, N.L.C. On Over-fitting in Model Selection and Subsequent Selection Bias in Performance Evaluation. J. Mach. Learn. Res. 2010, 11, 2079–2107. [Google Scholar]
- Lewis, M.; Spiliopoulou, A.; Goldmann, K. Nestedcv. CRAN R Package. 2022. Available online: https://cran.r-project.org/web/packages/nestedcv/vignettes/nestedcv.html (accessed on 15 May 2023).
- Montreal Declaration for a Responsible Development of AI Team. Montreal Declaration for a Responsible Development of Artificial Intelligence 2018. Montreal, QC, Canada. 2018. Available online: https://www.montrealdeclaration-responsibleai.com/ (accessed on 15 May 2023).
1. Select and determine the machine-learning algorithms to be used (ideally, use at least 3; if computing time is a concern, use elastic net or LASSO). |
2. Run the analysis with these machine-learning algorithms and optimize the parameters using nested cross-validation (NCV) with a predefined performance metric (e.g., AUC, accuracy, MSE). Record the performance metric from each outer validation. Ideally, use at least 5 inner validations and 10 outer validations. A random grid search can be used to find the parameters, or more advanced methods such as the Bayesian grid search can be used to save time. |
3. The parameters resulting in the best predictive performance in the outer validation will be the optimized NCV parameters. The performance metric obtained from this best outer validation test will be considered as the performance of the particular ML model. |
4. Fit the optimized parameters obtained from the NCV on all of the data. |
5. Calculate the variable importance (VI) scores using the Greenwell method using the final model obtained in Step 4. |
6. Calculate the bootstrapped confidence interval of the variable importance scores by taking a bootstrap sample of the data repeatedly and fit the NCV-optimized parameters using the ML models on the bootstrapped samples (at least 100 bootstrap replicates). |
7. Plot the bootstrapped confidence interval, showing both the VI obtained in step 5 and the mean VI scores from the bootstrap (see Figure 1 as examples). |
8. Show the partial dependence plots (PDP) for each of the variables that were deemed important by the ML models. PDPs will show the actual relationship between the variables and outcomes. |
9. If of interest, calculate the strength of interaction using the Greenwell method also on the optimized NCV model from Step 4. |
10. Plot some of the strongest interactions of interest with the PDP. |
11. Consider the variables that were selected by multiple ML methods and the variables selected by the ML method with the best predictive performance to be the variables that are most importantly associated with the outcome. |
Random Forest | Neural Network | LASSO | Elastic Net (EN) | |
---|---|---|---|---|
Sensitivity | 0.94 (0.88, 0.98) | 0.93 (0.91, 0.95) | 0.94 (0.87, 0.98) | 0.91 (0.89, 0.93) |
Specificity | 0.40 (0.27, 0.55) | 0.72 (0.68, 0.76) | 0.45 (0.32, 0.59) | 0.40 (0.36, 0.45) |
AUC (95% CI) | 0.74 (0.68, 0.86) | 0.85 (0.83, 0.88) | 0.78 (0.70, 0.86) | 0.78 (0.71, 0.86) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Dharma, C.; Fu, R.; Chaiton, M. Table 2 Fallacy in Descriptive Epidemiology: Bringing Machine Learning to the Table. Int. J. Environ. Res. Public Health 2023, 20, 6194. https://doi.org/10.3390/ijerph20136194
Dharma C, Fu R, Chaiton M. Table 2 Fallacy in Descriptive Epidemiology: Bringing Machine Learning to the Table. International Journal of Environmental Research and Public Health. 2023; 20(13):6194. https://doi.org/10.3390/ijerph20136194
Chicago/Turabian StyleDharma, Christoffer, Rui Fu, and Michael Chaiton. 2023. "Table 2 Fallacy in Descriptive Epidemiology: Bringing Machine Learning to the Table" International Journal of Environmental Research and Public Health 20, no. 13: 6194. https://doi.org/10.3390/ijerph20136194
APA StyleDharma, C., Fu, R., & Chaiton, M. (2023). Table 2 Fallacy in Descriptive Epidemiology: Bringing Machine Learning to the Table. International Journal of Environmental Research and Public Health, 20(13), 6194. https://doi.org/10.3390/ijerph20136194