Modelling in-hospital length of stay: A comparison of linear and ensemble models for competing risk analysis

J Juan Carlos Espinosa-Moreno F Fernando García-García N Naia Mas-Bilbao S Susana García-Gutiérrez M María José Legarreta-Olabarrieta D Dae-Jin Lee

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 N=19,602 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.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 20, Issue 8
Published August 26, 2025
Pages e0322101
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (6)

J

Juan Carlos Espinosa-Moreno

F

Fernando García-García

N

Naia Mas-Bilbao

S

Susana García-Gutiérrez

M

María José Legarreta-Olabarrieta

D

Dae-Jin Lee