Predicting length of hospital stay in community-acquired pneumonia using clinical and treatment factors: a retrospective study with restricted cubic spline and piecewise regression analysis.
Community-acquired pneumonia (CAP) remains a leading cause of hospitalization worldwide. Accurate prediction of length of stay (LOS) is crucial for optimizing hospital bed turnover, improving clinical resource allocation, and facilitating the development of individualized discharge plans, thereby reducing the strain on healthcare systems.
We retrospectively analyzed 423 adults hospitalized with CAP from January 2022 to December 2023. Clinical characteristics, laboratory data, comorbidities, and treatment variables were extracted from electronic health records. Univariate and multivariable linear regression models were initially employed to identify independent predictors of LOS. The predictive performance of the final multivariable model was assessed using R2, adjusted R2, Akaike Information Criterion, and 10-fold cross-validation. To further explain the complex relationship between specific treatment factors and LOS, restricted cubic splines and piecewise regression were utilized, specifically to evaluate non-linear associations and identify clinical inflection points.
The final model showed strong performance (R2 = 0.864; adjusted R2 = 0.862). Independent predictors of prolonged LOS included respiratory failure, pressure ulcers, elevated blood urea nitrogen, antibiotic modification during hospitalization, traditional Chinese medicine use, and antibiotic duration. Restricted cubic spline analysis demonstrated a significant non-linear relationship between antibiotic duration and LOS (P < 0.05). Piecewise regression identified an inflection point at 7.398 days, after which LOS increased more rapidly.
Multiple clinical and treatment-related factors were associated with LOS in CAP. Antibiotic duration showed a pronounced non-linear pattern, with treatment beyond 1 week linked to markedly longer hospitalization. These findings may help identify patients at risk of prolonged LOS and support more efficient clinical decision-making.
We retrospectively analyzed 423 adults hospitalized with CAP from January 2022 to December 2023. Clinical characteristics, laboratory data, comorbidities, and treatment variables were extracted from electronic health records. Univariate and multivariable linear regression models were initially employed to identify independent predictors of LOS. The predictive performance of the final multivariable model was assessed using R2, adjusted R2, Akaike Information Criterion, and 10-fold cross-validation. To further explain the complex relationship between specific treatment factors and LOS, restricted cubic splines and piecewise regression were utilized, specifically to evaluate non-linear associations and identify clinical inflection points.
The final model showed strong performance (R2 = 0.864; adjusted R2 = 0.862). Independent predictors of prolonged LOS included respiratory failure, pressure ulcers, elevated blood urea nitrogen, antibiotic modification during hospitalization, traditional Chinese medicine use, and antibiotic duration. Restricted cubic spline analysis demonstrated a significant non-linear relationship between antibiotic duration and LOS (P < 0.05). Piecewise regression identified an inflection point at 7.398 days, after which LOS increased more rapidly.
Multiple clinical and treatment-related factors were associated with LOS in CAP. Antibiotic duration showed a pronounced non-linear pattern, with treatment beyond 1 week linked to markedly longer hospitalization. These findings may help identify patients at risk of prolonged LOS and support more efficient clinical decision-making.
Authors
Zeng Zeng, Yang Yang, Jiang Jiang, Luo Luo, Luo Luo, Chen Chen, Song Song, Wang Wang, Zhu Zhu, Zheng Zheng, Wei Wei, Pan Pan, Lin Lin
View on Pubmed