Development and evaluation of an explainable machine learning-based prediction model for workplace bullying among clinical nurses

Background Workplace bullying harms nurses’ physical and mental health and may compromise care quality and patient safety. Previous studies have investigated its associated factors mainly with traditional statistical methods. However, such models are limited in identifying risk at the individual level, whereas machine learning offers a new way to identify nurses at risk of workplace bullying. Objective This study aimed to develop prediction models for workplace bullying among clinical nurses using seven machine-learning algorithms, compare their performance to identify the best-performing model, and combine Shapley Additive Explanations (SHAP) with Shiny to visualize the optimal model. Methods Between August and September 2025, clinical nurses were recruited by convenience sampling from three tertiary general hospitals in central China and completed the Negative Acts Questionnaire-Revised online. Participants were randomly allocated to training and validation sets at a 7:3 ratio. Variables were selected by univariate analysis, LASSO regression and the Boruta algorithm (R 4.4.2). Seven models were developed in Python 3.10: logistic regression (LR), decision tree (DT), random forest (RF), support vector machine (SVM), extreme gradient boosting (XGBoost), Light Gradient Boosting Machine (LightGBM), and K-nearest neighbors (KNN). Performance was compared by the area under the curve (AUC), sensitivity, specificity, calibration and decision curve analysis. The best-performing model was interpreted with SHAP and displayed through a Shiny interface. Results Workplace bullying was reported by 286 nurses (27.98%), and seven predictors were retained: weekly working hours, emotional exhaustion, working years, technical title, position, departmental atmosphere and daily workload. AUC ranged from 0.798 to 0.889 in the training set and from 0.775 to 0.887 in the validation set. XGBoost showed relatively stable discrimination across the two sets (0.889 and 0.865) together with favorable sensitivity, specificity and calibration, and was selected as the final model. Furthermore, SHAP analysis indicated that emotional exhaustion, departmental atmosphere, daily workload and weekly working hours contributed most to its predictions. Conclusion The XGBoost model showed acceptable discrimination and calibration; its risk estimates may help nurse managers identify clinical nurses at high risk of workplace bullying. Meanwhile, nurse managers should pay attention to clinical nurses at high risk and provide targeted support accordingly.

Authors

Institutions

Publication Details

Journal
Frontiers in Psychology
Published
2026-11-26
DOI
https://doi.org/10.3389/fpsyg.2026.2009114
Primary Topic
Workplace Violence and Bullying
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Development and evaluation of an explainable machine learning-based prediction model for workplace bullying among clinical nurses

Meiyun Jia, Yujie Zhao, Ke Song, Huiyuan Xue et al.
Frontiers in Psychology
Workplace Violence and Bullying
article

Development and evaluation of an explainable machine learning-based prediction model for workplace bullying among clinical nurses

Meiyun Jia, Yujie Zhao, Ke Song, Huiyuan Xue, Hui Xu, Baojiang Zhang
article en

Abstract

Background Workplace bullying harms nurses’ physical and mental health and may compromise care quality and patient safety. Previous studies have investigated its associated factors mainly with traditional statistical methods. However, such models are limited in identifying risk at the individual level, whereas machine learning offers a new way to identify nurses at risk of workplace bullying. Objective This study aimed to develop prediction models for workplace bullying among clinical nurses using seven machine-learning algorithms, compare their performance to identify the best-performing model, and combine Shapley Additive Explanations (SHAP) with Shiny to visualize the optimal model. Methods Between August and September 2025, clinical nurses were recruited by convenience sampling from three tertiary general hospitals in central China and completed the Negative Acts Questionnaire-Revised online. Participants were randomly allocated to training and validation sets at a 7:3 ratio. Variables were selected by univariate analysis, LASSO regression and the Boruta algorithm (R 4.4.2). Seven models were developed in Python 3.10: logistic regression (LR), decision tree (DT), random forest (RF), support vector machine (SVM), extreme gradient boosting (XGBoost), Light Gradient Boosting Machine (LightGBM), and K-nearest neighbors (KNN). Performance was compared by the area under the curve (AUC), sensitivity, specificity, calibration and decision curve analysis. The best-performing model was interpreted with SHAP and displayed through a Shiny interface. Results Workplace bullying was reported by 286 nurses (27.98%), and seven predictors were retained: weekly working hours, emotional exhaustion, working years, technical title, position, departmental atmosphere and daily workload. AUC ranged from 0.798 to 0.889 in the training set and from 0.775 to 0.887 in the validation set. XGBoost showed relatively stable discrimination across the two sets (0.889 and 0.865) together with favorable sensitivity, specificity and calibration, and was selected as the final model. Furthermore, SHAP analysis indicated that emotional exhaustion, departmental atmosphere, daily workload and weekly working hours contributed most to its predictions. Conclusion The XGBoost model showed acceptable discrimination and calibration; its risk estimates may help nurse managers identify clinical nurses at high risk of workplace bullying. Meanwhile, nurse managers should pay attention to clinical nurses at high risk and provide targeted support accordingly.

Frontiers in PsychologyVol. 17
Henan University of Traditional Chinese Medicine (CN)
Workplace Violence and Bullying
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon