A predictive model for osteoporosis in frail elderly patients with cerebral infarction: an integrated analysis based on machine learning and care-sensitive indicators
TL;DR
A risk prediction model constructed using five common risk factors for osteoporosis development in frail elderly patients with cerebral infarction include age, TFI score, GNRI, Barthel Index, and SAS score demonstrates predictive value, high calibration accuracy, and clinical utility.
Abstract
To identify key risk factors for osteoporosis in elderly patients with frailty and cerebral infarction using three machine learning algorithms—Least Absolute and Selective Operator (LASSO) regression, Extreme Gradient Boosting (XGBoost), and Random Forest (RF)—and establish a risk prediction model to provide data support for clinical prevention. A retrospective study was conducted using clinical data from 120 elderly frail patients with cerebral infarction admitted to our hospital between April 2024 and October 2025. Patients were categorized into an osteoporosis occurrence group (n=41) and a non-occurrence group (n=79) based on medical records indicating osteoporosis development. Clinical data were collected and compared. Risk factors were screened using “overlap-covering” screening with three machine learning methods: LASSO regression, XGBoost, and RF. The intersecting variables were incorporated into a logistic regression model to analyze risk factors for osteoporosis in elderly frail patients with cerebral infarction. Data analysis was performed using R software. RF to screen risk factors using “overlap coverage.” Intersecting variables were incorporated into logistic regression to analyze factors influencing osteoporosis in elderly patients with frailty and cerebral infarction. A nomogram prediction model was developed using R software, internally validated via Bootstrap resampling (1000 iterations), and its predictive accuracy assessed through calibration curves. Clinical utility was evaluated using decision curves. Significant differences (P < 0.05) were observed between the occurrence and non-occurrence groups in gender, age, affected circulatory system, disease severity, Tilburg Frailty Inventory (TFI) score, Global Nutritional Risk Index (GNRI), Barthel Index, and Self-Rating Anxiety Scale (SAS) score. Through machine learning screening using LASSO regression, XGBoost, and RF, five common risk factors for osteoporosis in elderly frail patients with cerebral infarction were identified: age, TFI score, GNRI, Barthel Index, and SAS score as five common risk factors for osteoporosis in elderly frail patients with cerebral infarction. These were incorporated into a logistic regression model. Analysis revealed that age, TFI score, and SAS score were risk factors for osteoporosis in this population (OR = 1.102, 2.876, 1.177, P<0.05). GNRI and Barthel Index were protective factors (OR = 0.913, 0.838, P<0.05). The Hosmer-Lemeshow goodness-of-fit test yielded χ²=2.345, P = 0.969>0.05, indicating acceptable model fit. Based on the logistic regression results, a risk prediction model for osteoporosis in elderly frail patients with cerebral infarction was constructed using a nomogram. The AUC was 0.955 (95% CI: 0.920–0.991). Calibration curves showed Cox-Snell R² = 0.755 and Nagelkerke R² = 0.546, indicating strong explanatory power and high calibration of the model. The clinical decision curve generally exceeded both extreme curves, demonstrating that the nomogram effectively captured the risk distribution. Nagelkerke R²: 0.546, indicating strong explanatory power and high calibration for the dependent variable. The clinical decision curve generally exceeded both extreme curves, demonstrating that the factors included in the nomogram provide high net benefit for predicting osteoporosis in patients. Key factors influencing osteoporosis development in frail elderly patients with cerebral infarction include age, TFI score, GNRI, Barthel Index, and SAS score. The risk prediction model constructed using these factors demonstrates predictive value, high calibration accuracy, and clinical utility, providing theoretical guidance for clinical practice.