Hostname: page-component-77f85d65b8-lfk5g Total loading time: 0 Render date: 2026-03-28T09:39:37.622Z Has data issue: false hasContentIssue false

Identifying most important predictors for suicidal thoughts and behaviours among healthcare workers active during the Spain COVID-19 pandemic: a machine-learning approach

Published online by Cambridge University Press:  08 May 2025

Itxaso Alayo
Affiliation:
Hospital del Mar Research Institute, Barcelona, Spain Biosistemak Institute for Health Systems Research, Bilbao, Bizkaia, Spain Red de Investigación en Cronicidad, Atención Primaria y Promoción de la Salud RICAPPS-(RICORS), Instituto de Salud Carlos III (ISCIII), Madrid, Spain Department of Medicine and Life Sciences (MELIS), Universitat Pompeu Fabra, Barcelona, Spain
Oriol Pujol
Affiliation:
Departament de Matemàtiques i Informàtica, Universitat de Barcelona, Barcelona, Spain
Jordi Alonso
Affiliation:
Hospital del Mar Research Institute, Barcelona, Spain Department of Medicine and Life Sciences (MELIS), Universitat Pompeu Fabra, Barcelona, Spain CIBER de Epidemiología y Salud Pública (CIBERESP), Instituto de Salud Carlos III, Madrid, Spain
Montse Ferrer
Affiliation:
Hospital del Mar Research Institute, Barcelona, Spain Department of Medicine and Life Sciences (MELIS), Universitat Pompeu Fabra, Barcelona, Spain CIBER de Epidemiología y Salud Pública (CIBERESP), Instituto de Salud Carlos III, Madrid, Spain
Franco Amigo
Affiliation:
Hospital del Mar Research Institute, Barcelona, Spain CIBER de Epidemiología y Salud Pública (CIBERESP), Instituto de Salud Carlos III, Madrid, Spain
Ana Portillo-Van Diest
Affiliation:
Hospital del Mar Research Institute, Barcelona, Spain Department of Medicine and Life Sciences (MELIS), Universitat Pompeu Fabra, Barcelona, Spain CIBER de Epidemiología y Salud Pública (CIBERESP), Instituto de Salud Carlos III, Madrid, Spain
Enric Aragonès
Affiliation:
Institut d’Investigació en Atenció Primària IDIAP Jordi Gol, Barcelona, Spain Atenció Primària Camp de Tarragona, Institut Català de la Salut, Tarragona, Spain
Andrés Aragon Peña
Affiliation:
Epidemiology Unit, Regional Ministry of Health, Community of Madrid, Madrid, Spain Fundación Investigación e Innovación Biosanitaria de AP, Comunidad de Madrid, Madrid, Spain
Ángel Asúnsolo Del Barco
Affiliation:
Department of Surgery, Medical and Social Sciences, Faculty of Medicine and Health Sciences, University of Alcala, Alcalá de Henares, Spain Ramón y Cajal Institute of Sanitary Research (IRYCIS), Madrid, Spain Department of Epidemiology and Biostatistics, Graduate School of Public Health and Health Policy, The City University of New York, New York, NY, USA
Mireia Campos
Affiliation:
Service of Prevention of Labor Risks, Medical Emergencies System, Generalitat de Catalunya, Barcelona, Spain
Meritxell Espuga
Affiliation:
Occupational Health Service, Hospital Universitari Vall d’Hebron, Barcelona, Spain
Ana González-Pinto
Affiliation:
BIOARABA, Hospital Universitario Araba-Santiago, UPV/EHU, Vitoria-Gasteiz, Spain CIBER Salud Mental (CIBERSAM), Madrid, Spain
Josep Maria Haro
Affiliation:
CIBER Salud Mental (CIBERSAM), Madrid, Spain Parc Sanitari Sant Joan de Déu, Institut de Recerca Sant Joan de Deu (IRSJD), Sant Boi de Llobregat, Barcelona, Spain
Nieves López-Fresneña
Affiliation:
Hospital General Universitario Gregorio Marañón, Madrid, Spain
Alma D. Martínez de Salázar
Affiliation:
UGC Salud Mental, Hospital Universitario Torrecárdenas, Almería, Spain
Juan D. Molina
Affiliation:
CIBER Salud Mental (CIBERSAM), Madrid, Spain Villaverde Mental Health Center, Clinical Management Area of Psychiatry and Mental Health, Psychiatric Service, Hospital Universitario 12 de Octubre, Madrid, Spain Research Institute Hospital 12 de Octubre (i+12), Madrid, Spain Facultad de Medicina, Universidad Francisco de Vitoria, Madrid, Spain
Rafael M. Ortí-Lucas
Affiliation:
Servicio de Medicina Preventiva y Calidad Asistencial, Hospital Clínic Universitari de Valencia, Valencia, Spain
Mara Parellada
Affiliation:
CIBER Salud Mental (CIBERSAM), Madrid, Spain Hospital General Universitario Gregorio Marañón, Madrid, Spain
José Maria Pelayo-Terán
Affiliation:
CIBER Salud Mental (CIBERSAM), Madrid, Spain Servicio de Psiquiatría y Salud Mental, Hospital el Bierzo, Gerencia de Asistencia Sanitaria del Bierzo (GASBI). Gerencia Regional de Salud de Castilla y Leon (SACYL), Ponferrada, León, Spain Area de Medicina Preventiva y Salud Pública, Departamento de Ciencias Biomédicas, Universidad de León, León, Spain
Maria João Forjaz
Affiliation:
Red de Investigación en Cronicidad, Atención Primaria y Promoción de la Salud RICAPPS-(RICORS), Instituto de Salud Carlos III (ISCIII), Madrid, Spain National Center of Epidemiology, Instituto de Salud Carlos III (ISCIII), Madrid, Spain
Aurora Pérez-Zapata
Affiliation:
Hospital Universitario Príncipe de Asturias, Servicio de Prevención de Riesgos Laborales, Spain
José Ignacio Pijoan
Affiliation:
Red de Investigación en Cronicidad, Atención Primaria y Promoción de la Salud RICAPPS-(RICORS), Instituto de Salud Carlos III (ISCIII), Madrid, Spain Clinical Epidemiology Unit-Hospital Universitario Cruces/ OSI EEC, Biobizkaia Health Research Institute, Barakaldo, Spain
Nieves Plana
Affiliation:
Red de Investigación en Cronicidad, Atención Primaria y Promoción de la Salud RICAPPS-(RICORS), Instituto de Salud Carlos III (ISCIII), Madrid, Spain Ramón y Cajal University Hospital, IRYCIS, Department of Surgery, Medical and Social Sciences, Faculty of Medicine and Health Sciences, University of Alcalá, Alcala de Henares, MAD, Spain
Elena Polentinos-Castro
Affiliation:
Service of Prevention of Labor Risks, Medical Emergencies System, Generalitat de Catalunya, Barcelona, Spain Research Unit, Primary Care Management, Madrid Health Service, Madrid, Spain Department of Medical Specialities and Public Health, King Juan Carlos University, Madrid, Spain
Maria Teresa Puig
Affiliation:
Universitat Autònoma de Barcelona (UAB), Barcelona, Spain Department of Epidemiology and Public Health, Hospital de la Santa Creu i Sant Pau, Barcelona, Spain Biomedical Research Institute Sant Pau (IIB Sant Pau), Barcelona, Spain CIBER Enfermedades Cardiovasculares (CIBERCV), Madrid, Spain
Cristina Rius
Affiliation:
CIBER de Epidemiología y Salud Pública (CIBERESP), Instituto de Salud Carlos III, Madrid, Spain Agència de Salut Pública de Barcelona, Barcelona, Spain
Ferran Sanz
Affiliation:
Department of Medicine and Life Sciences (MELIS), Universitat Pompeu Fabra, Barcelona, Spain Research Progamme on Biomedical Informatics (GRIB), Hospital del Mar Research Institute, Barcelona, Spain Instituto Nacional de Bioinformatica – ELIXIR-ES, Barcelona, Spain
Cònsol Serra
Affiliation:
CIBER de Epidemiología y Salud Pública (CIBERESP), Instituto de Salud Carlos III, Madrid, Spain CiSAL-Centro de Investigación en Salud Laboral, Hospital del Mar Research Institute/University Pompeu Fabra, Barcelona, Spain Occupational Health Service, Hospital del Mar, Barcelona, Spain
Iratxe Urreta-Barallobre
Affiliation:
CIBER de Epidemiología y Salud Pública (CIBERESP), Instituto de Salud Carlos III, Madrid, Spain Osakidetza Basque Health Service, Donostialdea Integrated Health Organisation, Donostia University Hospital, Clinical Epidemiology Unit, San Sebastián, Spain Biodonostia Health Research Institute, Clinical Epidemiology, San Sebastián, Spain
Ronny Bruffaerts
Affiliation:
Center for Public Health Psychiatry, Universitair Psychiatrisch Centrum, KU Leuven, Leuven, Belgium
Eduard Vieta
Affiliation:
CIBER Salud Mental (CIBERSAM), Madrid, Spain Institute of Neuroscience, Hospital Clinic, University of Barcelona, IDIBAPS, Barcelona, Spain
Víctor Pérez-Solá
Affiliation:
CIBER Salud Mental (CIBERSAM), Madrid, Spain Universitat Autònoma de Barcelona (UAB), Barcelona, Spain Institute of Neuropsychiatry and Addiction (INAD), Parc de Salut Mar, Barcelona, Spain
Philippe Mortier*
Affiliation:
Hospital del Mar Research Institute, Barcelona, Spain CIBER de Epidemiología y Salud Pública (CIBERESP), Instituto de Salud Carlos III, Madrid, Spain
Gemma Vilagut
Affiliation:
Hospital del Mar Research Institute, Barcelona, Spain CIBER de Epidemiología y Salud Pública (CIBERESP), Instituto de Salud Carlos III, Madrid, Spain
*
Corresponding author: Philippe Mortier; Email: pmortier@researchmar.net
Rights & Permissions [Opens in a new window]

Abstract

Aims

Studies conducted during the COVID-19 pandemic found high occurrence of suicidal thoughts and behaviours (STBs) among healthcare workers (HCWs). The current study aimed to (1) develop a machine learning-based prediction model for future STBs using data from a large prospective cohort of Spanish HCWs and (2) identify the most important variables in terms of contribution to the model’s predictive accuracy.

Methods

This is a prospective, multicentre cohort study of Spanish HCWs active during the COVID-19 pandemic. A total of 8,996 HCWs participated in the web-based baseline survey (May–July 2020) and 4,809 in the 4-month follow-up survey. A total of 219 predictor variables were derived from the baseline survey. The outcome variable was any STB at the 4-month follow-up. Variable selection was done using an L1 regularized linear Support Vector Classifier (SVC). A random forest model with 5-fold cross-validation was developed, in which the Synthetic Minority Oversampling Technique (SMOTE) and undersampling of the majority class balancing techniques were tested. The model was evaluated by the area under the Receiver Operating Characteristic (AUROC) curve and the area under the precision–recall curve. Shapley’s additive explanatory values (SHAP values) were used to evaluate the overall contribution of each variable to the prediction of future STBs. Results were obtained separately by gender.

Results

The prevalence of STBs in HCWs at the 4-month follow-up was 7.9% (women = 7.8%, men = 8.2%). Thirty-four variables were selected by the L1 regularized linear SVC. The best results were obtained without data balancing techniques: AUROC = 0.87 (0.86 for women and 0.87 for men) and area under the precision–recall curve = 0.50 (0.55 for women and 0.45 for men). Based on SHAP values, the most important baseline predictors for any STB at the 4-month follow-up were the presence of passive suicidal ideation, the number of days in the past 30 days with passive or active suicidal ideation, the number of days in the past 30 days with binge eating episodes, the number of panic attacks (women only) and the frequency of intrusive thoughts (men only).

Conclusions

Machine learning-based prediction models for STBs in HCWs during the COVID-19 pandemic trained on web-based survey data present high discrimination and classification capacity. Future clinical implementations of this model could enable the early detection of HCWs at the highest risk for developing adverse mental health outcomes.

Study registration

NCT04556565

Information

Type
Original Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (http://creativecommons.org/licenses/by/4.0), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press.
Figure 0

Table 1. Sociodemographic and work characteristics of Spanish healthcare workers during the COVID-19 pandemic assessed at T1 (N = 4,809)

Figure 1

Figure 1. (a) The receiver operating characteristics curve and the area under the receiver operating characteristic curve (AUROC) for suicidal thoughts and behavior prediction. The results of the prediction using different balancing test are shown (left). (b) The precision-recall curve and the area underthe precision-recall curve of the models. The results of the prediction using different balancing test are shown (right).

Abbreviations: ROC: receiver operating characteristics; AUC: area under the curve; No balancing: no balancing technique was used; Undersampling: undersampling of the majority class technique was used; SMOTE: Synthetic Minority Oversampling Technique was used.
Figure 2

Figure 2. (a) The receiver operating characteristics curve and the area under the receiver operating characteristic (AUROC) curve of the models for men and women. (b) The precision-recall curve and the area under the precision-recall curve of the models for men and women.

Abbreviations: ROC: receiver operating characteristics; AUC: area under the curve.
Figure 3

Figure 3. Shapley additive explanation (SHAP) summary graph. Each point on the graph is a SHAP value for one variable. The color represents the value of the variable from low (blue) to high (pink).

Notes: The color of each point on the graph represents the value of the corresponding variable: pink indicates high values and blue indicates low values. The horizontal axis (x-axis) represents the SHAP value. Abbreviations: C-SSRS: Suicidal thoughts and behaviors screen; PHQ-9: Patient Health Questionnaire 9 item; CIDI: Composite International Diagnostic Interview; Prime-MD: Primary Care Evaluation of Mental Disorders; BAFFS: Brief Assessment of Family Functioning Scale; CD-RISC: Connor-Davidson Resilience Scale; OSS3: Oslo Social Support Scale; OCI-R: Obsessive Compulsive Inventory revised.
Figure 4

Figure 4. Shapley additive explanation (SHAP) summary graph. for men (a) and women (b).

Notes: The color of each point on the graph represents the value of the corresponding variable: pink indicates high values and blue indicates low values. The horizontal axis (x-axis) represents the SHAP value. Abbreviations: C-SSRS: Suicidal thoughts and behaviors screen; PHQ-9: Patient Health Questionnaire 9 item; CIDI: Composite International Diagnostic Interview; Prime-MD: Primary Care Evaluation of Mental Disorders; BAFFS: Brief Assessment of Family Functioning Scale; CD-RISC: Connor-Davidson Resilience Scale; OSS3: Oslo Social Support Scale; OCI-R: Obsessive Compulsive Inventory revised.
Supplementary material: File

Alayo et al. supplementary material

Alayo et al. supplementary material
Download Alayo et al. supplementary material(File)
File 506.3 KB