3.1 Patient Baseline Characteristics
Between January 2018 and December 2022, a total of 4,170 elderly patients with hip fractures were included in our study. After screening, 1,539 patients were excluded, leaving 2,631 patients in the final analysis. The excluded patients comprised 1,077 with non-hip fractures, 328 non-surgical patients, and 134 with incomplete data (Figure 1).
Table 1 presents the baseline clinical characteristics of the overall sample and compares those between the acute heart failure (AHF) group and the non-AHF group among elderly patients with hip fractures. Overall, the mean age of the patients was 79.3±7.7, with 766 males (29.1%) and 1,865 females (70.9%). Among them, 888 patients (33.7%) experienced acute heart failure before surgery. There were statistically significant differences in gender distribution, age, and age groups (<75 years and ≥75 years) between the two groups (p<0.05). Regarding comorbidities, the prevalence of coronary artery disease and arrhythmias was significantly higher in the AHF group compared to the non-AHF group (p<0.05). Additionally, preoperative complications such as pulmonary infection, ventricular arrhythmias, and acute myocardial infarction also showed a higher incidence in the AHF group, with significant statistical differences (p<0.05).
3.2 Univariate Analysis of Laboratory Data and Ultrasound Examinations
Table 2 displays the preoperative laboratory and lower limb venous ultrasound characteristics of elderly patients with hip fractures. The incidences of anemia, hypokalemia, hyponatremia, and hypoalbuminemia were significantly higher in the AHF group compared to the non-AHF group, showing significant statistical differences (p<0.05). However, there was no significant difference in the incidence of lower limb venous thrombosis between the two groups.
3.3 Development and Validation of Nomograms
Using R, patients were randomly divided into a training set and a test set in a 7:3 ratio, with 1,843 patients in the training set and 788 in the test set. Initial analysis with LASSO regression on the training set selected 17 variables out of 22 (Figures 2A and 2B). Subsequent multivariable logistic regression analysis identified gender, age, coronary heart disease, pulmonary infection, ventricular arrhythmia, acute myocardial infarction, anemia, hypokalemia, and hypoalbuminemia as independent risk factors for the occurrence of acute heart failure before surgery in elderly patients with hip fractures (Tables 3 and Figure 3). Based on these independent risk factors, we developed a nomogram model to predict the probability of pre-surgical acute heart failure in elderly patients with hip fractures (Figure 4). The predictive model is given by Logit(P) = -2.262 - 0.315 × Sex + 0.673 × Age + 0.556 × Coronary heart disease + 0.908 × Pulmonary infection + 0.839 × Ventricular arrhythmia + 2.058 × Acute myocardial infarction + 0.442 × Anemia + 0.496 × Hypokalemia + 0.588 × Hypoalbuminemia. The variance inflation factor (VIF) was calculated for each variable in the model, indicating all predictor variables had VIF values well below the threshold of 5, specifically: Sex 1.01, Age 1.01, Coronary heart disease 1.01, Pulmonary infection 1.01, Ventricular arrhythmia 1.02, Acute myocardial infarction 1.01, Anemia 1.11, Hypokalemia 1.02, Hypoalbuminemia 1.12.
The nomogram was evaluated through 1,000 bootstrap resampling, and the results showed that the calibration curve deviated only slightly from the perfect prediction line, indicating good agreement between the model's predictions and the actual observations (Figure 5). Comparing the Area Under the Curve (AUC) of the Receiver Operating Characteristic (ROC) between the training and validation datasets, the AUC for the training set was 0.761 (0.740-0.786), and for the test set, it was 0.767 (0.723-0.799) (Figure 6). Moreover, the nomogram model's corrected C-statistic obtained through bootstrap resampling was 0.776, demonstrating good performance in internal validation. This means that the model has strong discriminative ability and can accurately predict the risk of acute heart failure in patients. Decision Curve Analysis (DCA) indicates significant clinical decision-making value with a probability range of 8%-90% in the training set (Figure 7A) and 9%-86% in the validation set (Figure 7B). Additionally, the Clinical Impact Curve (CIC) demonstrates the effect of different threshold settings on the number of patients predicted by the model (Figures 7C and 7D). This further suggests the model has substantial application potential, especially in predicting the risk of acute heart failure in elderly patients after hip fractures. The model provides a powerful tool to more precisely predict the likelihood of acute heart failure, thereby guiding clinicians towards more appropriate preventative and therapeutic measures. Implementing clinical interventions based on this model's predictions can effectively optimize patient management, likely leading to positive impacts on patient health outcomes.
3.4 Development of Predictive Models Using Machine Learning Methods
All raw data was preprocessed prior to being input into the machine learning model, including cleaning and transformation steps, to ensure data integrity and high quality for accurate handling and analysis by the machine learning algorithms. The features with the highest importance scores in standardization were Acute Myocardial Infarction, Ventricular Arrhythmia, Pulmonary Infection, and Anemia (Figure 8A and Table 4). Correlations between variables were also calculated and are displayed in Figure (Figure 8B).
Models were evaluated using various machine learning methods, with the Area Under the Curve (AUC) values obtained as follows: RF 0.746 (0.710—0.782), SVM 0.714 (0.676-0.752), AdaBoost 0.735 (0.699-0.772), XGBoost 0.747 (0.711-0.783), GBM 0.757 (0.721 - 0.792), with GBM showing the best AUC among the models (Figure 9). Accuracy, sensitivity, precision, and F1 score were also calculated for each model, with GBM showing the best performance in terms of accuracy (73%) and sensitivity (95.6%) (Table 5).
SHAP analysis was conducted to understand the impact of multiple features on the predictive model for acute heart failure in elderly patients with hip fractures before surgery (Figure 10). The Feature Importance Plot shows each observation as a dot, with the SHAP value on the x-axis indicating the impact of the feature on the model's output. Positive values indicate contributions that increase risk, while negative values indicate contributions that decrease risk. The color gradient from purple to yellow represents feature values from low to high. It is observed that the SHAP values for Acute Myocardial Infarction are distributed in the positive region, with several higher positive points indicating that the presence of acute myocardial infarction significantly increases the risk of acute heart failure. Conversely, Hyponatremia shows both positive and negative SHAP values, concentrated near zero, suggesting a relatively small or individual-dependent impact on the prediction. However, the SHAP values for COPD are mainly in the negative region, possibly indicating a lower risk of acute heart failure in patients with COPD in this model. Through individual-level predictive behavior analysis using the SHAP algorithm, the model revealed key variables influencing the risk of acute heart failure for four patients, showing the contribution of each factor to the prediction and identifying Acute Myocardial Infarction as the main variable affecting all patients. Its SHAP value was significantly higher than other features, and we also found that Anemia, Ventricular Arrhythmia, and Pulmonary Infection play important roles in increasing the risk of heart failure (Figures 11A-D). The SHAP values of these variables provide positive contributions, reinforcing their importance in risk assessment, consistent with the overall trends in the Feature Importance Plot.
By constructing multivariate dependence plots (Figure 12), we suggest interactions between variable features, such as between Acute Myocardial Infarction and Anemia, where scatter plots reveal their association in predicting the risk of acute heart failure. With an increase in the feature value of acute myocardial infarction, a significant rise in SHAP values is observed, especially at higher feature values of acute myocardial infarction, where we see a cluster of yellow dots in the upper right corner of the graph. These yellow dots represent higher values of anemia, implying that in the context of high values of acute myocardial infarction, anemia's predictive contribution to the risk of acute heart failure increases. Conversely, when the feature values of acute myocardial infarction are lower, the dots, mostly shown in purple and concentrated in the lower left corner of the graph, represent a smaller predictive contribution to heart failure risk. This pattern indicates that anemia has a lesser predictive impact on the risk of heart failure in patients with a lower degree of myocardial infarction. Thus, the scatter plot shows that the interaction between acute myocardial infarction and anemia in predicting the risk of acute heart failure is non-linear and modulated by the combined influence of these two feature values.