Practical Geriatrics ›› 2026, Vol. 40 ›› Issue (9): 929-934.doi: 10.3969/j.issn.1003-9198.2026.09.013

Previous Articles     Next Articles

Construction and validation of an early risk model for chronic pain after hip replacement in the elderly based on machine learning algorithms

ZHANG Li, LI Juanqi, ZHANG Cailei, ZHANG Ziru   

  1. Department of Orthopedics, Tangdu Hospital of Air Force Medical University, Xi’an 710038, China
  • Received:2026-02-14 Online:2026-09-20 Published:2026-09-16
  • Contact: ZHANG Ziru, Email: 282081840@qq.com

Abstract: Objective To construct and validate a model for early risk stratification of chronic post-surgical pain (CPSP) after hip replacement in the elderly based on machine learning algorithms. Methods The elderly patients who underwent hip replacement surgery at Tangdu Hospital of Air Force Medical University from May 2023 to June 2025 were enrolled, and were divided into a modeling group (n=425) and a testing group (n=182) in a 7∶3 ratio. LASSO regression was used to screen the characteristic variables of CPSP, and early-risk models were constructed employing various methods: logistic regression, extreme gradient boosting (XGBoost), k-nearest neighbors (KNN), random forest (RF), Light GBM, support vector machine (SVM), and Gaussian Naive Bayes classification (GNB). The models were evaluated using ROC curves, calibration curves, decision curve analysis (DCA), and F1 score, with Shapley additive explanation (SHAP) analysis employed to determine the importance of key variables. Results The incidence rate of CPSP in the modeling group was 20.24% (86/425), compared with 24.18% (44/182) in the testing group. There were statistically significant differences between the modeling group and the testing group in preoperative anxiety, prosthesis type, and physical therapy outcomes (P<0.05). Using LASSO regression, six variable characteristics were identified: alcohol consumption history, time to first postoperative hip movement, surgical duration, Numerical Rate Scale (NRS) score 24 hours after operation, intraoperative blood loss volume, and lower extremity venous thrombosis. Among the seven models developed, the logistic regression model demonstrated the best performance in terms of the area under the curve (AUC), calibration curve, and DCA curve. Using a logistic regression model, the variable factors were ranked by importance as follows: NRS score 24 hours after operation, time to first hip movement after surgery, alcohol consumption history, surgical duration, intraoperative blood loss volume, and lower extremity venous thrombosis. Conclusions The early-stage CPSP risk model for elderly patients receiving hip replacement, constructed using logistic regression, demonstrates strong predictive capability and high interpretability. All model indicators can be obtained during the patient’s hospitalization, facilitating early identification of the patients at high risk for postoperative CPSP. This enables timely implementation of appropriate preventive measures and treatment.

Key words: hip replacement, chronic posto-surgical pain, machine learning algorithms, forecasting model

CLC Number: