I am interested in knowing whether or not there is a consensus about the optimal way to analyze hospital length of stay (LOS) data from a RCT. This is typically a very right-skewed distribution, whereby most patients are discharged within a few days to a week, but the rest of the patients have quite unpredictable (and sometimes quite lengthy) stays, which form the right tail of the distribution.

Options for analysis include:

  • t test (assumes normality which is not likely present)
  • Mann Whitney U test
  • logrank test
  • Cox proportional hazards model conditioning on group allocation

Do any of these methods have demonstrably higher power?

  • $\begingroup$ do you have time to event in hh:mm or hours? $\endgroup$
    – munozedg
    Commented Dec 13, 2011 at 17:25

4 Answers 4


I'm actually embarking on a project that does exactly this, although with observational, rather than clinical data. My thoughts have been that because of the unusual shape of most length of stay data, and the really well characterized time scale (you know both the origin and exit time essentially perfectly), the question lends itself really well to survival analysis of some sort. Three options to consider:

  • Cox proportional hazards models, as you've suggested, for comparing between the treatment and exposed arms.
  • Straight Kaplan-Meyer curves, using a log-rank or one of the other tests to examine the differences between them. Miguel Hernan has argued that this is actually the preferable method to use in many cases, as it does not necessarily assume a constant hazard ratio. As you've got a clinical trial, the difficulty of producing covariate adjusted Kaplan-Meyer curves shouldn't be a problem, but even if there are some residual variables you want to control for, this can be done with inverse-probability-of-treatment weights.
  • Parametric survival models. There are, admittedly, less commonly used, but in my case I need a parametric estimate of the underlying hazard, so these are really the only way to go. I wouldn't suggest jumping straight into using the Generalized Gamma model. It's something of a pain to work with - I'd try a simple Exponential, Weibull and Log-Normal and see if any of those produce acceptable fits.

I favor the Cox proportional hazards model, which will also handle censored length of stay (death before successful hospital discharge). A relevant handout may be found at http://biostat.app.vumc.org/wiki/pub/Main/FHHandouts/slide.pdf with code here: http://biostat.app.vumc.org/wiki/pub/Main/FHHandouts/model.s

  • $\begingroup$ Thanks Frank. Would the logrank test also not handle censoring? So, is the benefit of the Cox the ability to adjust for covariates? $\endgroup$
    – pmgjones
    Commented Dec 13, 2011 at 11:37
  • 1
    $\begingroup$ logrank is a special case of the Cox model so no need for it, and it won't allow you to adjust for continuous covariates as the Cox model does. The Cox model also provides several ways to handle ties. $\endgroup$ Commented Dec 13, 2011 at 18:10
  • $\begingroup$ The links have deprecated. $\endgroup$
    – Galen
    Commented Aug 10, 2022 at 22:49

I recommend logrank test for testing for differences between groups and for each independent variable. Maybe you will need to adjust for several variables (at least for those significant in the logrank test) in a Cox proportional hazards model. Gamma generalized model (parametric) could be an alternative to Cox if you will need baseline (hazard) risk estimation.


death is a competing event with discharge. Censoring the deaths would not be censoring missing data at random. Examining the cumulative incidence of death and discharge and comparing the subdistribution hazards might be more appropriate.

  • $\begingroup$ The only difference AFAIK is the the subdist hazard approach wants you to censor deaths late, not at the time of actual death, whereas the approach I proposed censored on day of death. I believe that defining the main effect as "successful discharge" will work with ordinary non-competing risk estimators. $\endgroup$ Commented Aug 10, 2022 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.