DOI: 10.57760/sciencedb.j00253.01250
title: ​Exploration of Comorbidity Mechanisms Between Chronic Pain and Depression: Machine Learning Prediction Models and SHAP Interpretability Analysis Based on the CHARLS Cohort
title: 慢性疼痛与抑郁的共病机制探索：基于CHARLS队列的机器学习预测模型与SHAP可解释分析

description: Objective Based on the biopsychosocial medical model, this study investigates multidimensional influencing factors of depressive states in middle-aged and older Chinese adults, constructs machine learning prediction models, and analyzes the dynamic mechanisms of key risk features to provide evidence for precise interventions.Methods Utilizing data from the China Health and Retirement Longitudinal Study (CHARLS, 2011–2020), multidimensional indicators including sociodemographics, lifestyle factors, and 14 somatic pain symptoms were incorporated. Least absolute shrinkage and selection operator (LASSO) regression and recursive feature elimination (RFE) were employed to screen predictors. Machine learning models (logistic regression, XGBoost, etc.) were developed, and model performance and clinical applicability were evaluated via ROC curves, calibration curves, and SHAP interpretability analysis.Results Somatic pain significantly influenced depression risk, with toe pain (OR=5.23), back pain (OR=4.71), and headache (OR=4.15) ranking highest. Sociodemographic factors such as female gender (OR=1.83) and low education (primary school or below vs. high school or above, OR=3.12) were associated with elevated risk. The logistic regression model (AUC=0.716) and Gaussian Naive Bayes (AUC=0.715) demonstrated optimal performance, outperforming traditional linear models. SHAP analysis revealed: lower limb pain (leg pain SHAP=-3~0) and BMI’s bidirectional regulatory effect (high BMI positive contribution +0.5~+1.2) as key biomarkers, while education level reduced misclassification risk through negative regulation (SHAP median -0.6).Conclusion Chronic pain symptom clusters and socioeconomic gradients jointly drive depression risk in middle-aged and older adults. Machine learning models integrating pain localization and metabolic interactions enable efficient screening. This study supports integrating low back and leg pain management into depression prevention systems and identifies precise intervention targets for high-risk groups (low-educated women, patients with multisite pain). The interpretable artificial intelligence framework establishes methodological foundations for developing clinical decision support systems in primary care.
description: Objective Based on the biopsychosocial medical model, this study investigates multidimensional influencing factors of depressive states in middle-aged and older Chinese adults, constructs machine learning prediction models, and analyzes the dynamic mechanisms of key risk features to provide evidence for precise interventions.Methods Utilizing data from the China Health and Retirement Longitudinal Study (CHARLS, 2011–2020), multidimensional indicators including sociodemographics, lifestyle factors, and 14 somatic pain symptoms were incorporated. Least absolute shrinkage and selection operator (LASSO) regression and recursive feature elimination (RFE) were employed to screen predictors. Machine learning models (logistic regression, XGBoost, etc.) were developed, and model performance and clinical applicability were evaluated via ROC curves, calibration curves, and SHAP interpretability analysis.Results Somatic pain significantly influenced depression risk, with toe pain (OR=5.23), back pain (OR=4.71), and headache (OR=4.15) ranking highest. Sociodemographic factors such as female gender (OR=1.83) and low education (primary school or below vs. high school or above, OR=3.12) were associated with elevated risk. The logistic regression model (AUC=0.716) and Gaussian Naive Bayes (AUC=0.715) demonstrated optimal performance, outperforming traditional linear models. SHAP analysis revealed: lower limb pain (leg pain SHAP=-3~0) and BMI’s bidirectional regulatory effect (high BMI positive contribution +0.5~+1.2) as key biomarkers, while education level reduced misclassification risk through negative regulation (SHAP median -0.6).Conclusion Chronic pain symptom clusters and socioeconomic gradients jointly drive depression risk in middle-aged and older adults. Machine learning models integrating pain localization and metabolic interactions enable efficient screening. This study supports integrating low back and leg pain management into depression prevention systems and identifies precise intervention targets for high-risk groups (low-educated women, patients with multisite pain). The interpretable artificial intelligence framework establishes methodological foundations for developing clinical decision support systems in primary care.