Modelling in-hospital length of stay: A comparison of linear and ensemble models for competing risk analysis
Open Access
- 26 August 2025
- journal article
- research article
- Published by Public Library of Science (PLoS) in PLOS ONE
- Vol. 20 (8) , e0322101
Abstract
Length of Stay (LoS) for in-hospital patients is a relevant indicator of efficiency in healthcare. Moreover, it is often related to the occurrence of hospital-acquired complications. In this work, we aim to explore time-to-event analysis for modelling LoS. We employed competing risk models (CR), as we considered two mutually exclusive outcomes: favorable discharge and deterioration. The explanatory variables included the patient’s sex, age, and longitudinal vital signs collected from a dataset comprising admissions. To address sparse measurements, we transformed longitudinal vital signs into cross-sectional statistics. Our approach involves data pre-processing, imputation of missing data, and variable selection. We proposed four types of CR models: Cause-specific Cox, Sub-distribution hazard, and two variants of Random Survival Forests, with both generalised Log-Rank test (cause-specific hazard estimates) and Gray’s test (cumulative incidences estimations) as node splitting rules. Performance in LoS CR models was evaluated over a time frame from 2 to 15 days. Additionally, we considered baselines with two well-established clinical early warning scores the National Early Warning Score (NEWS) and the Modified Early Warning Score (MEWS). The best model was Random Survival Forest using Gray’s test split, with Integrated Brier Score[×100] of 0.386, C-Index above 99%, and Brier Score below 0.006, along the entire time frame. Employing cross-sectional statistics derived from vital signs, along with rigorous data pre-processing, outperformed the degree of correctness of modelling LoS, compared to NEWS and MEWS.
Keywords
Funding Information
- Spanish State Research Agency (AEI / 10.13039/501100011033)
- FEDER (projects S3M1P4R: PID2020-115882RB-I00 and SPHERES: PID2023-153222OB-I00)
- Basque Government (BERC 2022–2025)
- Health Department of the Basque Government (2018111094)
- Spanish Ministry of Science, Innovation, and Universities (CEX2021-001142-S)
This publication has 64 references indexed in Scilit:
- Interventions to Reduce Hospital Length of Stay in High-risk PopulationsJAMA Network Open, 2021
- Prediction of Length of Stay Using Vital Signs at the Admission Time in Emergency Departments2021
- Standard errors and confidence intervals for variable importance in random forest regression, classification, and survivalStatistics in Medicine, 2018
- Variable selection – A review and recommendations for the practicing statisticianBiometrical Journal, 2018
- A Competing Risk Analysis for Hospital Length of Stay in Patients With BurnsJAMA Surgery, 2015
- Estimating and comparing time‐dependent areas under receiver operating characteristic curves for censored event times with competing risksStatistics in Medicine, 2013
- Early detection of impending physiologic deterioration among patients who are not in intensive care: Development of predictive models using data from an automated electronic medical recordJournal of Hospital Medicine, 2012
- Quantifying the predictive accuracy of time-to-event models in the presence of competing risksBiometrical Journal, 2011
- Multiple imputation using chained equations: Issues and guidance for practiceStatistics in Medicine, 2010
- Regression Modeling Strategies2001