Development of a Machine Learning Model to Estimate US Firearm Homicides in Near Real Time
- PMID: 36930150
- PMCID: PMC10024196
- DOI: 10.1001/jamanetworkopen.2023.3413
Development of a Machine Learning Model to Estimate US Firearm Homicides in Near Real Time
Abstract
Importance: Firearm homicides are a major public health concern; lack of timely mortality data presents considerable challenges to effective response. Near real-time data sources offer potential for more timely estimation of firearm homicides.
Objective: To estimate near real-time burden of weekly and annual firearm homicides in the US.
Design, setting, and participants: In this prognostic study, anonymous, longitudinal time series data were obtained from multiple data sources, including Google and YouTube search trends related to firearms (2014-2019), emergency department visits for firearm injuries (National Syndromic Surveillance Program, 2014-2019), emergency medical service activations for firearm-related injuries (biospatial, 2014-2019), and National Domestic Violence Hotline contacts flagged with the keyword firearm (2016-2019). Data analysis was performed from September 2021 to September 2022.
Main outcomes and measures: Weekly estimates of US firearm homicides were calculated using a 2-phase pipeline, first fitting optimal machine learning models for each data stream and then combining the best individual models into a stacked ensemble model. Model accuracy was assessed by comparing predictions of firearm homicides in 2019 to actual firearm homicides identified by National Vital Statistics System death certificates. Results were also compared with a SARIMA (seasonal autoregressive integrated moving average) model, a common method to forecast injury mortality.
Results: Both individual and ensemble models yielded highly accurate estimates of firearm homicides. Individual models' mean error for weekly estimates of firearm homicides (root mean square error) varied from 24.95 for emergency department visits to 31.29 for SARIMA forecasting. Ensemble models combining data sources had lower weekly mean error and higher annual accuracy than individual data sources: the all-source ensemble model had a weekly root mean square error of 24.46 deaths and full-year accuracy of 99.74%, predicting the total number of firearm homicides in 2019 within 38 deaths for the entire year (compared with 95.48% accuracy and 652 deaths for the SARIMA model). The model decreased the time lag of reporting weekly firearm homicides from 7 to 8 months to approximately 6 weeks.
Conclusions and relevance: In this prognostic study of diverse secondary data on machine learning, ensemble modeling produced accurate near real-time estimates of weekly and annual firearm homicides and substantially decreased data source time lags. Ensemble model forecasts can accelerate public health practitioners' and policy makers' ability to respond to unanticipated shifts in firearm homicides.
Conflict of interest statement
Figures


Similar articles
-
Surveillance for Violent Deaths - National Violent Death Reporting System, 50 States, the District of Columbia, and Puerto Rico, 2022.MMWR Surveill Summ. 2025 Jun 12;74(5):1-42. doi: 10.15585/mmwr.ss7405a1. MMWR Surveill Summ. 2025. PMID: 40493548 Free PMC article.
-
Surveillance for Violent Deaths - National Violent Death Reporting System, 48 States, the District of Columbia, and Puerto Rico, 2020.MMWR Surveill Summ. 2023 May 26;72(5):1-38. doi: 10.15585/mmwr.ss7205a1. MMWR Surveill Summ. 2023. PMID: 37220104 Free PMC article.
-
A National Evaluation of the Impact of Child Access Prevention Laws on Rates of Youth Suicide and Other Youth Firearm Deaths.J Am Acad Child Adolesc Psychiatry. 2025 Aug;64(8):897-905. doi: 10.1016/j.jaac.2024.11.009. Epub 2024 Nov 19. J Am Acad Child Adolesc Psychiatry. 2025. PMID: 39571727
-
Firearm Laws and Firearm Homicides: A Systematic Review.JAMA Intern Med. 2017 Jan 1;177(1):106-119. doi: 10.1001/jamainternmed.2016.7051. JAMA Intern Med. 2017. PMID: 27842178
-
Falls prevention interventions for community-dwelling older adults: systematic review and meta-analysis of benefits, harms, and patient values and preferences.Syst Rev. 2024 Nov 26;13(1):289. doi: 10.1186/s13643-024-02681-3. Syst Rev. 2024. PMID: 39593159 Free PMC article.
Cited by
-
Comparison of SES method and SARIMA model in predicting the number of admissions in the department of neurology.Sci Rep. 2025 May 26;15(1):18287. doi: 10.1038/s41598-025-03106-4. Sci Rep. 2025. PMID: 40415093 Free PMC article.
-
Precision in Prevention and Health Surveillance: How Artificial Intelligence May Improve the Time of Identification of Health Concerns through Social Media Content Analysis.Yearb Med Inform. 2024 Aug;33(1):158-165. doi: 10.1055/s-0044-1800736. Epub 2025 Apr 8. Yearb Med Inform. 2024. PMID: 40199301 Free PMC article. Review.
-
A machine-learning prediction model to identify risk of firearm injury using electronic health records data.J Am Med Inform Assoc. 2024 Oct 1;31(10):2173-2180. doi: 10.1093/jamia/ocae222. J Am Med Inform Assoc. 2024. PMID: 39231045
-
Nutrition facts, drug facts, and model facts: putting AI ethics into practice in gun violence research.J Am Med Inform Assoc. 2024 Oct 1;31(10):2414-2421. doi: 10.1093/jamia/ocae102. J Am Med Inform Assoc. 2024. PMID: 38796834 Free PMC article.
References
-
- Centers for Disease Control and Prevention . Web-Based Injury Statistics Query and Reporting System (WISQARS). National Center for Injury Prevention and Control; 2020.
-
- Brooks C. Medical Examiner and Coroner Offices, 2018. Bureau of Justice Statistics; 2021.
-
- Atlanta Police Department . Crime Dashboard. 2022. Accessed September 26, 2022. https://atlantapd.maps.arcgis.com/apps/dashboards/7dc3c7f9f54a4a288069de...