 Research article
 Open Access
 Open Peer Review
 Published:
How to handle mortality when investigating length of hospital stay and time to clinical stability
BMC Medical Research Methodology volume 11, Article number: 144 (2011)
Abstract
Background
Hospital length of stay (LOS) and time for a patient to reach clinical stability (TCS) have increasingly become important outcomes when investigating ways in which to combat Community Acquired Pneumonia (CAP). Difficulties arise when deciding how to handle inhospital mortality. Adhoc approaches that are commonly used to handle time to event outcomes with mortality can give disparate results and provide conflicting conclusions based on the same data. To ensure compatibility among studies investigating these outcomes, this type of data should be handled in a consistent and appropriate fashion.
Methods
Using both simulated data and data from the international Community Acquired Pneumonia Organization (CAPO) database, we evaluate two adhoc approaches for handling mortality when estimating the probability of hospital discharge and clinical stability: 1) restricting analysis to those patients who lived, and 2) assigning individuals who die the "worst" outcome (rightcensoring them at the longest recorded LOS or TCS). Estimated probability distributions based on these approaches are compared with rightcensoring the individuals who died at time of death (the complement of the KaplanMeier (KM) estimator), and treating death as a competing risk (the cumulative incidence estimator). Tests for differences in probability distributions based on the four methods are also contrasted.
Results
The two adhoc approaches give different estimates of the probability of discharge and clinical stability. Analysis restricted to patients who survived is conceptually problematic, as estimation is conditioned on events that happen at a future time. Estimation based on assigning those patients who died the worst outcome (longest LOS and TCS) coincides with the complement of the KM estimator based on the subdistribution hazard, which has been previously shown to be equivalent to the cumulative incidence estimator. However, in either case the time to inhospital mortality is ignored, preventing simultaneous assessment of patient mortality in addition to LOS and/or TCS. The power to detect differences in underlying hazards of discharge between patient populations differs for test statistics based on the four approaches, and depends on the underlying hazard ratio of mortality between the patient groups.
Conclusions
Treating death as a competing risk gives estimators which address the clinical questions of interest, and allows for simultaneous modelling of both inhospital mortality and TCS / LOS. This article advocates treating mortality as a competing risk when investigating other time related outcomes.
Background
Traditionally, mortality or survival has been the outcome of clinical interest in evaluating new ways to combat community acquired pneumonia (CAP). More recently, outcomes such as a patient's length of hospital stay (LOS) and their time to reach clinical stability (TCS) have increasingly become outcomes of interest in patients with CAP, as these are directly relevant to patient management, quality of care, and hospital costs [1–3]. Since these outcomes are timetoevent outcomes, interest lies in estimating the probability that a patient will have reached clinical stability or have been discharged from the hospital by a given day. The standard estimator for timetoevent distributions is the KaplanMeier estimator, and a key element of this method is the ability to handle data that are censored. For TCS and LOS, this can occur if followup information on a patient is unavailable after a certain point, denoted right censoring since it is only known that the event did not occur by the end of the followup period and it is assumed that the event of interest would have occurred at some point after this time. Another possibility is that the event of interest did not occur prior to a prespecified time, for example when information regarding time to clinical stability is only maintained for the first week after a patient is admitted to the hospital.
A key assumption with the KaplanMeier estimator is that the event of interest will eventually occur for all patients in the population. For individuals who die prior to reaching clinical stability or being discharged from the hospital, clearly the assumption of future event occurrence in the KaplanMeier estimator is violated. Since an event (death) occurred to those individuals which prevents further followup, analysts must decide how to handle LOS and TCS data for these individuals. In the CAP literature, several adhoc methods for dealing with such data have surfaced: 1) disregard LOS and TCS data from individuals who die [4–6] or 2) assign the 'worst outcome' for individuals who die (i.e., rightcensor them at the largest LOS or TCS value) [2, 7, 8]. However, it is not clear what quantity each of these adhoc methods is estimating, and their use can lead to differing conclusions. In addition, neither technique addresses how to estimate mortality along with LOS and TCS.
An alternative approach to handling mortality is to treat this event as a competing risk, which precludes the occurrence of the other events of interest (see [9], Chapter 8; see also [10, 11]). Though these methods have been established for over thirty years, applications to outcomes in hospital epidemiology are still developing [1, 12]. In the current context, when a patient dies in the hospital they can no longer reach clinical stability or be discharged from the hospital. With competing risks, probabilities of interest are the cumulative incidence functions for each event type. These functions estimate the probability of experiencing a specific event by a given time, while allowing for the possibility of other events to occur.
The goal of this article is to evaluate what the two adhoc approaches to handling mortality are estimating, and demonstrate the potential disparity in results which can occur from naive use of these approaches. Results from the adhoc estimators are further compared with the advocated way of handling mortality as a competing risk. Differences between the estimators are illustrated using data from the international Community Acquired Pneumonia Organization (CAPO) database [3], as well as simulated data. Supplemental material is also provided which gives illustrative statistical code for investigators to use in their own studies.
Methods
Notation and Definitions
In this section, we define the functions to be estimated. The presentation given here follows in spirit to that given in Allignol et al. [10, 13], see also [14] for a nice tutorial. Note that while we restrict attention to two competing event types, the methods extend generally to any finite number of competing events. Let (X _{ t } )_{ t≥0 }represent the state that an individial is in for every time point, X _{ t } ∈ {0, 1, 2}. The initial state X _{ t } = 0 is the starting state at time 0 (hospital admission), X _{ t } = 1 represents hospital discharge or clinical stability, and X _{ t } = 2 indicates inhospital mortality. For simplicity of presentation, we will restrict attention to hospital discharge, since the modeling of clinical stability is analogous (but see comments in Discussion). The two states discharge and inhospital mortality represent competing events, since a transition into either of the two states precludes a transition into the other. In the terminology of general multistate models, they are referred to as terminal or absorbing states. The possible transitions from hospital admission into each of them are considered competing risks, and the state space and possible transitions are represented schematically in Figure 1. The stochastic system is fully characterized by the two causespecific hazards α _{01}(t) and α _{02}(t), which give the instantaneous rates of making making a 0 → 1 or 0 → 2 transition at time t, respectively. The causespecific hazards can be thought of more intuitively using the following approximate relationship (see [10]),
The quantity ${\alpha}_{0j}\left(t\right)dt$ then represents the probability of making a 0 → j transition within the infinitesimal interval dt = [t, t + dt), where dt is used to represent both the interval and its length. The random variable T represents the transition time.
The causespecific hazards sum to give the allcause hazard, α _{0}.(t)dt ≈ P(T ∈ dtT ≥ t), where the '·' indicates summation over the subscript. A key quantity for statistical inference is the cumulative causespecific hazard ${A}_{0j}\left(t\right)={\int}_{0}^{t}{\alpha}_{0j}\left(u\right)du$, which represents the total accumulated hazard for making a 0 → j transition by time t. Using the cumulative allcause hazard A _{0}. (t), the survival function for T is then a function of both causespecific hazard functions, S(t) = P(T > t) = exp{A _{0}.(t)} [13].
When competing risks are present, probabilities are described in terms of the causespecific cumulative incidence functions,
The integrand on the righthand side of the equation represents the joint probability of having survived (i.e., made neither transition) to time just prior to u (denoted u) and subsequently making a 0 → j transition at time u. Like the causespecific hazard functions, the two cumulative incidence functions can be summed, resulting in the allcause distribution function P(T ≤ t) = CI _{1}(t) + CI _{2}(t).
In addition to the causespecific hazards, another hazard function which has been developed in the competing risks literature is the subdistribution hazard [15, 16]. This hazard function is obtained from the cumulative incidence function,
The quantity λ _{ j } (t)dt ≈ P {T ∈ dt, X _{ T } = jT ≥ t ∪ (T ≤ t, X _{ T } ≠ j)} is then interpreted as the probability of experiencing a 0 → j transition at time t, among those who are either alive at time t or who have experienced an event other than j at or prior to time t [17]. As noted in [16] and pointed out in [17], this interpretation is problematic since it corresponds to a hazard for an improper random variable, as those individuals who experience an event other than j will have a 0 → j transition time of ∞. Further, it conditions on having reached one of the competing terminal states, which violates the intuitive notion that individuals who have reached a terminal state should not be considered for further followup (see [17], Principle 2). However, as the regression model developed by Fine and Gray in [16] provides a direct link between the cumulative incidence function and a set of covariates, in practice models based on the subdistribution hazard have proven useful [18, 19].
Estimators
For competing risks, the basic ingredients for estimation are the number of individuals who make a transition, and the number of individuals who are still at risk of making a transition, at each time point. Let t _{1} < t _{2} < ... < t _{ k } be the k distinct times where events occur in the data. Using standard counting process notation, let ${N}_{0j}\left(t\right)$ count the number of observed 0 → j transitions by time t, and Y _{0}(t) indicate the number of individuals still in state 0 just prior to time t. The latter is called the number of individuals atrisk for transitions out of state 0 at time t, and naturally acounts for subjects that are rightcensored by removing them from the risk set at their censoring time (it also accounts for lefttruncation, where individuals do not enter the riskset unless their event time occurs after a certain time). The total number of transitions by time t is given by N _{0}. (t). Lastly, the number of 0 → j transitions at a given time t is given by $\Delta {N}_{0j}\left(t\right)$.
The starting point for estimation are the NelsonAalen (NA) estimators of the causespecific cumulative hazard functions (see [20], Chapter 4.2)
The NA estimator of the allcause hazard function is ${\widehat{A}}_{0\cdot}\left(t\right)={\widehat{A}}_{01}\left(t\right)+{\widehat{A}}_{02}\left(t\right)$, and the increments of the NA estimator are denoted $\Delta {\widehat{A}}_{0j}\left(t\right)={\widehat{A}}_{0j}\left(t\right){\widehat{A}}_{0j}\left(t\right)=\Delta {N}_{0j}\left(t\right)\u2215{Y}_{0}\left(t\right)$.
KaplanMeier Estimator
The standard KaplanMeier (KM) estimator [21] of the overall survivor function is then
This estimator is a decreasing step function with "drops" at the observed transition times. The KM estimator estimates the probability that an event will eventually occur for all patients. For competing risks data, $\u015c\left(t\right)$ is then a valid estimate of the overall probability that an individual has not experienced any of the competing events by a given time.
By substituting ${\widehat{A}}_{0j}\left(t\right)$ for ${\widehat{A}}_{0\cdot}\left(t\right)$ in (5), an estimate of the net survival function ${S}_{j}\left(t\right)=exp\left\{{A}_{0j}\left(t\right)\right\}$ for event type j is obtained (see [20], Chapter 2.7). The complement $1{\u015c}_{j}\left(t\right)$ estimates the net probability to experience event j by a particular time. However, this net probability is only valid in the hypothetical setting where the competing events do not occur (reference [20], page 52). In the schematic represented by Figure 1, the quantity $1{\u015c}_{1}\left(t\right)$ estimates the probability of hospital discharge by time t, in an ideal world where inhospital mortality cannot occur. In this case, individuals who experience one of the competing events are censored at their event times. The KM estimate for the probability of clinical stability and hospital discharge by time t will be denoted as $1{\u015c}_{cs}\left(t\right)$ and $1{\u015c}_{dis}\left(t\right)$, respectively. The variability of the KM estimator is given by the Greenwood estimator, which for the overall survival function has the form
(see [20], Chapter 4.2).
Cumulative Incidence Estimator
The AalenJohansen estimates of the cumulative incidence functions [22] are obtained by plugging in $\u015c\left(u\right)$ for P(T > u) and $\Delta {\widehat{A}}_{0j}\left(u\right)$ for ${\alpha}_{0j}\left(u\right)du$ in (2), and summing over all observed transition times t _{ i } ≤ t,
This estimator can be derived in a straightforward fashion starting from the KM estimator of the overall survivor function [13]. The increments of the KM estimator (5) are $\widehat{P}\left(T={t}_{i}\right)=\u015c\left({t}_{i1}\right)\u015c\left({t}_{i}\right)=\u015c\left({t}_{i1}\right)\Delta {\widehat{A}}_{0j}\left({t}_{i}\right)$. Since the causespecific cumulative incidence functions sum to the allcause distribution function, decomposing the KM increments into components corresponding to each hazard and summing over t _{ i } ≤ t, gives the desired result. The estimate of the cumulative incidence function for clinical stability, hospital discharge, and inhospital mortality by time t will be denoted as ${\hat{CI}}_{cs}\left(t\right)$, ${\hat{CI}}_{dis}\left(t\right)$, and ${\hat{CI}}_{mor}\left(t\right)$, respectively.
The variability of the cumulative incidence estimator has received considerable attention in the recent literature [13, 23]. Braun and Yuan [23] compared six different estimators of the variance, and Allignol et al. [13] demonstrated that the Greenwoodtype estimator of the variance (Equation (6) in [13]) is algebraically equivalent to the top performing estimators in [23]. Of note, the variance estimator given by Gray [15], available in the R package cmprsk [24], performed the poorest for small (N ≤ 50) sample sizes.
Restricted Estimator
The first adhoc approach evaluated in this study was to exclude individuals who died from the analysis (restricted analysis). With this approach, individuals who die are excluded entirely from the analysis, and their LOS data are essentially treated as being censored at day zero. Of significant note is that the restricted estimator suffers from a serious conceptual flaw, in that estimation at any time t requires conditioning on the occurrence of future events after time t (see [17], Principle 1). Nevertheless, the complements of the KM estimates based on these data were used to estimate the probability of clinical stability and hospital discharge, denoted $1{\u015c}_{cs}^{R}\left(t\right)$ and $1{\u015c}_{dis}^{R}\left(t\right)$, respectively. The variance of this estimator is calculated using the Greenwood estimator on this restricted sample.
Worst Outcome Estimator
The second adhoc approach was to assign individuals who died the "worst" outcome (worst outcome analysis). In this approach, individuals who die are rightcensored at the longest possible followup time. This is essentially equivalent to assigning a discharge or clinically stable time of ∞ to the individuals who die in the hospital, and so coincides with the random variable which forms the basis of the subdistribution hazard in Equation (3). The complement of the KM estimator based on these censored subdistribution times has been previously shown to be equivalent to the cumulative incidence estimator (see [25] and [26] for proofs, also noted in [15]). In the Appendix, we give a simplified algebraic proof of this equality for the special case of our situation, administratively rightcensored data, and a heuristic argument is given in the 'CAPO Data' subsection of the Results. Estimates of the 'worst outcome' analysis for the probability of clinical stability and hospital discharge will be denoted $1{\u015c}_{cs}^{W}\left(t\right)$ and $1{\u015c}_{dis}^{W}\left(t\right)$, respectively. The estimate of the variability is again based on Greenwood's estimate.
Confidence Intervals and Testing
Pointwise 95% confidence intervals for each estimator at time t can be based on the general formula $\text{Estimate(}t)\pm 1.96\sqrt{\widehat{Var}\{\text{Estimate}(t)\}}$. For the KM, restricted, and worst outcome analysis, testing for differences in probability distributions between patient groups for LOS and TCS were done using the logrank test [27], and denoted ${\chi}_{K{M}_{dis}}^{2}$, ${\chi}_{{R}_{dis}}^{2}$, and ${\chi}_{{W}_{dis}}^{2}$. For the competing risks approach, the test statistics presented in [15] were used for testing differences between cumulative incidence functions (denoted ${\chi}_{C{I}_{dis}}^{2}$). It should be noted that for the two adhoc approaches, the test statistics are used primarily for illustrative purposes, to demonstrate the potential differences in conclusions drawn based on the two approaches.
CAPO Data
To illustrate the differences between the four estimation methods from an established database, analyses were performed on data from the international CAPO dataset (see [3, 28] for details). We consider the subset of 1,635 patients aged 65 years or greater, who were admitted to the hospital with CAP between June 1, 2001 and January 1, 2007. The data set includes patients from 40 hospitals located in 10 countries on 4 continents, for a detailed listing of all participating hospitals see Additional File 1. CAP was defined as a new pulmonary infiltrate (within 24 hours of admission), and associated with at least one of the following factors: a new or increased cough, an abnormal temperature (< 35.8°C or > 37.8°C), or an abnormal leukocyte count (leukocytosis, leucopenia or the absence of immature neutrophils). Pneumonia was considered as communityacquired if a patient had no history of hospitalization during the two weeks prior to admission.
Time to clinical stability was defined using the American Thoracic Society criteria for switch therapy from intravenous to oral antibiotic therapy: 1) improvement in cough and shortness of breath; 2) afebrile status for ≥ 8 hours (< 37.8°C); 3) normalizing leukocyte count by at least 10% from the previous day; and 4) adequate oral intake [29]. Time to clinical stability was calculated in days as the time from admission to the hospital to the time the above four criteria were met. Length of hospital stay (LOS) was defined as the time from admission to the hospital to discharge from the hospital. LOS was right censored at 30 days, since hospital stays longer than 30 days are considered unrelated to CAP and are not of primary interest [28]. Classification of patients into risk classes was done using the Pneumonia Severity Index (PSI) [30]. There are five possible rankings for the PSI, labeled Risk Class (RC) I to V, from least to most severe.
The study was approved by the Human Subject Protection Program Institutional Review Board at the University of Louisville. Additional approval was obtained from the local internal review board for each participating hospital. Patient consent was waived due to the retrospective and observational study design.
Simulated Data
Competing risks data were simulated following the methodology outlined in Beyersmann et al. [31]. A discrete time scale was used for t, in units of days. Two nonparametric hazard functions were constructed that approximated the observed discharge distributions in the CAPO data for Risk Class V patients:
Conditional on an event happening at time t, a binomial probability
P(X _{ T } = iT = t) = α _{0i }(t)/{α _{01}(t) + α _{02}(t)} was used to determine the event type, discharge (i = 1) or death (i = 2).
Events were simulated for t = 1,..., 30, and all individuals who had not experienced an event by day 30 were rightcensored at that point. For each simulation, we obtained four estimates of the probability of discharge by day t, including the cumulative incidence estimator ${\hat{CI}}_{dis}\left(t\right)$, the complement of the KaplanMeier estimator $1{\u015c}_{dis}\left(t\right)$, and the two adhoc estimators corresponding to the restricted analysis (all patients who died were removed, $1{\u015c}_{dis}^{R}\left(t\right)$) and the 'worst outcome' analysis (all patients who died were rightcensored at the longest allowed length of stay of 30, $1{\u015c}_{dis}^{W}\left(t\right)$). A listing of all four estimators is given in Table 1. To evaluate point estimates for each of the etimators, a total of 1,000 Monte Carlo simulations were run with a patient sample size of 1,500 for each simulation. These estimates were compared with the true cumulative incidence function CI _{ dis } (t).
We additionally compared the coverage of 95% linear confidence intervals for CI _{ dis } (t) based on ${\hat{CI}}_{dis}\left(t\right)\pm 1.96\sqrt{\hat{Var}\left\{{\hat{CI}}_{dis}\left(t\right)\right\}}$, using both Gray's estimate [15] and the Greenwoodtype estimate of the variance (Equation (6) of [13]). An additional 1,000 simulations were generated with sample sizes of 25, 50, 100, 200, and 750 to compare the coverage rates of the two estimators.
The probability of rejecting the null hypothesis of no differences in hospital discharge probability distributions between two patient groups was evaluated under several scenarios. First, simulations were conducted under the null hypothesis, with both the mortality and discharge hazard functions being equal between the two patient groups. Additionally, we ran simulations with the hazard ratio for mortality (HR_{ mor }) equal to 1.15 and 1.5, to investigate the dependence of each test statistic on the hazard ratio of the competing event. Five different sets of simulations were conducted under the alternative hypothesis, that discharge hazard functions differed between the two patient populations. In each case, a hazard ratio for hospital discharge HR _{ dis } of 1.15 was used. The five scenarios were a) the mortality hazard rates were equal for the two groups, b) the patient group with a higher discharge rate also had a slightly lower mortality rate (HR _{ mor } = 1/1.15 = 0.87), c) the patient group with a higher discharge rate also had a significantly lower mortality rate (HR _{ mor } = 1/1.5 = 0.67), d) the patient group with a higher discharge rate also had a slightly higher mortality rate (hazard ratio for mortality HR _{ mor } = 1.15), and e) the patient group with a higher discharge rate also had a significantly higher mortality rate (HR _{ mor } = 1.5). The latter two situations, though somewhat counterintuitive, may correspond to a therapy which reduces LOS but has a deleterious side effect in some patients which increases mortality. One thousand Monte Carlo replicates were used in each case, with a sample size of 750 patients for each group. An α = 0.05 cutoff was used for each test.
Software
All the analyses presented in this paper were performed using R version 2.12.2 [32], which is a freely available, opensource statistical programming language. The functions for competing risks analysis are included in the R addon package cmprsk [24], which also includes functions for fitting proportionalhazards regression models for the subdistribution function of a competing risk [16]. A nice tutorial on using the cmprsk package is given in [33]. Limitations of the cmprsk package are that it can only handle rightcensored data and that it uses an estimate of the variance which has been shown to be suboptimal [23]. Alternative R packages which can handle lefttruncated data and use the Greenwoodtype estimate of the variance include etm [34], msSurv [35], and mstate [36]. These are specialized packages for multistate models, of which competing risks is a special case. However, only the cmprsk package includes test statsitics [15] for comparing cumulative incidence curves. The interested reader is directed to the CRAN task view on survival [37] for a detailed listing of available Rpackages for survival analysis. Additional Files 2, 3, and 4 for this manuscript contain documented R code and data illustrating how to carry out all the competing risks analysis performed in this paper.
Results
An Illustrative Example
To illustrate the differences between the five estimators, consider the following artificial example of ten patients who are admitted to the hospital with CAP. Suppose that two of the patients die at days 3 and 5, five of the patients reach clinical stability on days 2, 2, 4, 5, and 7, and three patients do not reach clinical stability by day 7. After day 7, information regarding clinical stability is no longer collected, so that the three patients who did not reach clinical stability by day 7 are censored at day 7. The data are displayed in Tables 2, 3, where each row indicates a unique event time. Here t _{ i } indicates the event time in days (either death or reaching clinical stability), s _{ i } indicates the number of patients who reached clinical stability at time t _{ i } , d _{ i } indicates the number of patients who died at time t _{ i } , and y _{ i } indicates the number of patients who are eligible to either die or reach clinical stability at time t _{ i } . Table 2 gives the estimates based on the complement of the KaplanMeier estimator and the cumulative incidence function, while Table 3 provides estimates based on the adhoc estimators. The complement of the KM estimator $1{\u015c}_{cs}\left(t\right)$ is uniformly higher than the cumulative incidence estimator ${\hat{CI}}_{cs}\left(t\right)$, and the clinical interpretation of this estimate is unclear since it corresponds to an "alternative" world where patients cannot die in the hospital (see [17], Principle 3). Since the complement of the KM estimator assumes that all patients who are censored are still eligible to experience the event at some point in the future, it will overestimate the probability of experiencing the event of interest (reaching clinical stability) when competing risks are present (mortality).
The estimate of clinical stability restricted to only patients who lived, $1{\u015c}_{cs}^{R}\left(t\right)$, is higher than any of the other estimates. Since this estimate conditions on patients who die in the hospital at some future time, it is difficult to imagine how such an estimator would be useful in practice. The admitting physician would need to "know" which patients would ultimately die and which would live at the time of admission. In the strictly hypothetical situation that this knoweldge could be possessed, it would seem equally likely that the physician would know the exact day that clinical stability would be reached, precluding the need for this type of analysis.
The 'worst outcome' estimator $1{\u015c}_{cs}^{W}\left(t\right)$ coincides with the cumulative incidence estimator ${\hat{CI}}_{cs}\left(t\right)$. A heuristic for understanding the equivalence between the two algorithms involves Efron's 'redistribution to the right' algorithm [38]. Efron demonstrated that the KaplanMeier estimator can be derived using an algorithm which uniformly redistributes the probability mass associated with each right censored observation to all times to its right. When patients who die are not censored at the point of death but are instead censored at the end of the followup time (7 days), their probability weight is not redistributed to the other patients who are still alive and have not been discharged. Hence, the jump sizes for the cumulative incidence estimator and 'worst outcome' estimator are equivalent, whereas the jump sizes of the complement of the KM estimator are augmented by the redistributed weight of past censored observations.
The standard error of the cumulative incidence function is Gray's estimate [15] reported by the cmprsk package, and is notably larger than the standard error for the 'worst outcome' estimator. The latter is based on Greenwood's estimate, which we empirically verified is equivalent to the Greenwoodtype estimate of the variance for competing risks (Equation (6) in [13]). Differences between these two estimates of the variance, in terms of coverage rates for confidence intervals of point estimates, are investigated further in the Simulated Data section.
CAPO Data
Our analysis of the CAPO data focuses on length of hospital stay. We initially restrict our presentation to the subset of patients in the highest risk class calculated from the pneumonia severity index (PSI), Risk Class V (n = 410 patients). Figure 2 presents the four estimates for the probability of being discharged by a given day after hospital admittance. Since the inhospital mortality is relatively high in this patient subset (20% by day 14), the complement of the KaplanMeier estimate is considerably higher than the cumulative incidence estimate. The estimator restricted to the subset of patients who survived (restricted analysis) gives an overlyoptimistic picture of the probability of being discharged, and as noted previously the practical use of this estimator is highly questionable. The 'worst outcome' estimator again coincides with the cumulative incidence estimator.
The teststatistic for hospital discharge based on the cumulative incidence function has a pvalue of 5 × 10^{17}. Logrank tests based on the adhoc estimators, restricted and worst outcome, give pvalues of 8 × 10^{4} and 3 × 10^{18} respectively, which are several orders of magnitude different. The logrank test based on the KaplanMeier estimator gives a pvalue = 8 × 10^{8}, but it is unclear what is the clinical interpretation of this test.
The competing risks analysis allows simultaneous comparison of both LOS and mortality incidence. In contrast, right censoring or removing patients who die prevents mortality information from being incorporated. Treating mortality as a competing risk provides a mechanism to view the incidence curves of both outcomes, so that multiple outcomes can be compared between patient groups. To illustrate, we view both the discharge and mortality incidence for patients in RC V (410 patients) versus RC IV (822 patients) in Figure 3. The patients in RC IV have the higher discharge incidence curve, indicating that there is a higher probability of being discharged on any given day relative to patients in RC V. Conversely, patients in RC V have the higher inhospital mortality incidence curve.
Simulated Data
To more comprehensively evaluate the differences between the four methods, we simulated competing risks data using the methods in Beyersmann et al. [31]. The hazard functions for discharge and inhospital mortality were selected to roughly match the observed hazards in our data for Risk Class V patients (see Methods). Figure 4 presents the median values and 2.5% and 97.5% percentiles for each point estimate based on the 1,000 simulations for each estimation method, using a sample size of 1,500 for each simulation. The true cumulative incidence curve is shown in a solid black line for each plot. As expected, the median of the cumulative incidence estimates and the worst outcome estimates coincide exactly with the underlying cumulative incidence function. The median estimates for the restricted estimator and complement of the KaplanMeier estimator are also shown, and display a similar pattern to that observed in the real data.
As noted in the Methods, their are several estimators of the variance of cumulative incidence estimator that have been proposed in the literature. Previous research [23] has demonstrated that the Greenwoodtype estimator has better performance for small sample sizes, in particular relative to the estimator proposed by Gray [15]. We evaluated the coverage rates of 95% confidence intervals for the true cumulative incidence at selected time points, for both the Greenwood estimator of the variance and the Gray estimator. Results are displayed in Table 4 and show that the coverage rates for both intervals are in very good agreement with each other and close to the nominal 95% level for the range of sample sizes evaluated. Thus, though Gray's estimate of the variance is higher for smaller sample sizes, this difference did not translate into a difference in coverage rates for our simulations.
Lastly, we evaluated the power for the four methods to reject the null hypothesis of no differences in discharge probability distributions between patient groups, under various scenarios. A sample size of 750 patients was used for each of the two patient groups, for each simulation. It should be noted that each method is testing a different null hypothesis, e.g. the test based on the cumulative incidence estimator is testing for differences between the cumulative incidence functions CI _{ j } (t), j = 1, 2, while the test based on the KaplanMeier estimator is testing for differences between S _{ j } (t), j = 1, 2. Hence the results based on the tests are not directly comparable with each other. However, the simulations are still useful for illustrating how tests based on the estimators perform under different situations.
The first row of Table 5 displays the rejection proportions for the four methods when the hazards of both mortality and discharge are equal between the two patient groups (i.e., the null hypothesis is true), using an α level of 0.05. The methods all have a rejection rate close to the nominal level of 0.05. The next two rows display the rejection proportions when the hazard of discharge is the same, but the mortality hazard differs between the two groups. As the hazard of the competing event will have an influence on the incidence of the event of interest, all of the test statistics (except the KMbased test statistic ${\chi}_{K{M}_{dis}}^{2}$) increase as the HR for mortality deviates further from one. The KMbased test statistic is not influenced by the HR for mortality since it treats mortality events as independent rightcensoring events (i.e., it assumes mortality and discharge are independent).
The next five rows of Table 5 display the rejection proportions when the hazard of discharge is different between the two groups, for varying hazard ratios of mortality. When the hazard of mortality is the same between the two patient populations, the power of the methods to reject the null hypothesis of differences in discharge probability distributions are fairly close to each other. When the hazard ratio for mortality is varied, an interesting pattern emerges. When the hazard ratio is below one, the patient group with the higher discharge rate also has a decreased mortality rate, leading to more patients being discharged in that group and fewer patients dying. Hence, the difference in cumulative incidence curves for discharge is increased between the two patient groups, and the power subsequently increases as well. Conversely, when the hazard ratio for mortality is above one, the patient group with the higher discharge rate also has an increased mortality rate. Thus, patients in this group have an overall higher rate of either event, and since more patients are dying in this group as well the difference in the cumulative incidence of discharge is decreased relative to the second group. This is particularly true when the HR _{ mor } > HR_{ dis }, since in this case the ratio of discharge hazard (α _{01}) to mortality hazard (α _{02}) for this group is lower relative to the ratio of these two hazards for the second group.
The trend for ${\chi}_{{R}_{dis}}^{2}$, the test based on the restricted analysis estimator, is the exact opposite. When the HR for mortality is above one, the group with the higher discharge rate will have more patients removed from the study due to mortality. Hence the cumulative incidence of discharge calculated on this restricted sample will be exaggerated, leading to a greater difference in discharge cumulative incidence between the two patient groups. Conversely, when the HR for mortality is below one, fewer patients will be removed from the study for the group with the higher discharge rate, and the cumulative incidence of discharge will be dampened on this restricted sample, leading to a decrease in differences in discharge cumulative incidences between the two groups. The logrank test based on the KM estimator is again unaffected by the changes in mortality hazard between the two patient groups.
Discussion
The way in which mortality is handled while investigating other timerelated outcomes can have an impact on the results obtained and the interpretations conjectured. In the CAP literature, there is no consensus for how to properly handle mortality when evaluating TCS and LOS. Therefore, direct comparisons are difficult and conflicting conclusions can be reached depending on the approach that is used. Two adhoc approaches for handling mortality were investigated in this paper, analysis restricted to the subset of patients who survived and assigning patients who died the worst possible outcome. The two methods give different results for the same data and could lead to conflicting conclusions, unless investigators are aware of the differences between the estimators. The first approach conditions on the occurrence of future events, and the practical use of this estimator is questionable. The second approach coincides with the KaplanMeier estimator based on the subdistribution hazard, which has been proven to be equivalent to the cumulative incidence estimator [25]. In both cases the information concerning time to inhospital mortality is ignored, preventing dualassessment of both time to clinical stability or discharge and patient mortality.
It should be mentioned that although we considered the 'worst outcome' approach to be adhoc, the equivalence of this method to the random variables defined for the subdistribution function in [15] does not mean that we consider that latter to be adhoc as well. Indeed, the characterization of the subdistribution hazard function by Gray had a clearly defined purpose and context. In addition to showing equivalence between the KM estimator based on the subdistribution hazard and the cumulative incidence estimator, Geskus [25] showed that the latter could be characterized as a weighted empirical cumulative distribution function. In both cases, the weights depend on the censoring and truncation distributions of the data. A third characterization of the cumulative incidence function is as a KM estimator with a 'fractional risk set' [39], where censored individuals contribute a fractional mass to the risk set specified by an estimate of the probability that the individual would have experienced a particular event type. Applications of these alternative characterizations include regression modeling based on the subdistribution hazard [25], and nonparametric estimation for multistate models [40, 41].
The complement of the KaplanMeier estimator, which censors patients who die at their time of death, provides an estimate that is between the cumulative incidence function and restricted analysis estimator. As past authors have pointed out [17, 20, 42], this curve lacks a reasonable clinical interpretation in the presence of competing risks, since patients who die are still considered eligible to reach clinical stability and be discharged from the hospital. Proponents of the KM estimator favor the fact that it focuses on a single event type, and argue that the cumulative incidence function is difficult to interpret on its own due to its dependence upon the incidence of the competing events [43]. In response to this, Pepe and Mori [42] proposed the conditional probability estimator, which estimates the probability of an event conditional on the other events having not occurred by a given time. However, this estimator has been criticized on a conceptual basis [17], in that conditioning on the nonoccurrence of the other event types either conditions on the future (when considered from the origin time) or on having reached / not reached a terminal event (when considered at the current time t). As a result, we did not consider the conditional probability estimator in this manuscript.
In contrast to the adhoc estimators and KaplanMeier estimator, the estimators based on treating inhospital mortality as a competing risk have clearly defined interpretations. Recent applications of these approaches (and more general multistate models) to the study of nosocomial (hospitalacquired) pneumonia infections have been conducted by Beyersmann et al. [1, 12, 44] and Wolkewitz et al. [45]. However, there is still clear evidence that these methods are not commonly used in situations where they are warranted. Competing risks models are intuitively attractive because they disallow patients who die to subsequently be considered eligible for discharge or clinical stability (see [17], Principle 2). Further, the estimator also estimates the probability of inhospital death, so that an investigator can simultaneously evaluate the probability of reaching clinical stability or hospital discharge versus death by any given time.
Simulations revealed that the power of each method to detect differences in underlying discharge rates between patient groups depended on the rate of the competing event (mortality). When the hazard ratios were in opposite directions, so that the patient group with the higher discharge rate also had a lower mortality rate, differences in the cumulative incidence of discharge were increased and the power based on Gray's test [15] for the differences in cumulative incidence curves also increased. However, when the patient group with the higher discharge rate also had a higher mortality rate, the difference between cumulative incidence curves for discharge decreased with a corresponding decrease in power based on Gray's test. This phenomenon was explored in greater detail in Allignol et al. [10], who stressed the importance of the baseline hazard rate of each event type in addition to the hazard ratios. This importance was exemplified by Beyersmann et al. ([12], pgs. 336337), who demonstrated that conflicting results between the incidence rate and the incidence proportion (cumulative incidence) can occur when the hazard rate for the competing event dominates the hazard for the event of interest, and the differences in hazards for the event of interest are minor in magnitude. In our case, if we consider mortality to be the event of interest, such a case could arise if the hazard for mortality was minor in magnitude relative to the hazard for discharge / clinical stability. Then, if a subset of patients had a reduced mortality rate but also a reduced discharge rate, then patients in this group will on average have longer times in the hospital and, eventually, the cumulative incidence of mortality will be higher for these patients. Such a situation can be readily resolved by plotting the NelsonAalen estimators of the cumulative hazards, c.f. Figure 2 in [12] and [10]. Fortunately, in most realworld situations the patient group with the higher discharge rate will also have a reduced mortality rate, so that interpretation of results in most cases will be easier.
In contrast to the tests based on the cumulative incidence function, tests based on restricting the patient sample to those who survived had increased "power" when the group with the higher discharge rate also had a higher mortality rate. However, by removing patients who died from the study, the differences in mortality rates between the two patient populations results in a biased comparison between the two patient groups. The motivation for restricting analysis to the subset of patients who survived results from the desire of investigators to compare outcomes (LOS and TCS) seperately among this patient population. But when mortality differs between patient groups (e.g., as determined by treatment assignment), comparisons restricted to patients who survived will not result in a compatible set of patients being compared between the two groups. An intriguing alternative to the methods evaluated in this article which addresses this issue is the "survivor average causal effect" (SACE) [46, 47]. This method was designed to estimate a treatment effect on an outcome variable (e.g., LOS), when some of the patients die during the course of evaluation. Mortality is handled via stratification, but not on the observed outcome, which can be affected by treatment assignment. Rather, stratification is on the dual outcome of survival and treatment assignment. The primary focus is to estimate the treatment effect for the principal stratum, that is, those who would have survived irrespective of treatment assignment. Since for each individual survival is only observed for the actual treatment assigned, estimation of 'potential outcomes', or outcomes for each patient if they were given the opposite of their assigned treatment, is needed [48, 49]. Comparisons between SACE and the competing risks methods discussed in this article would be an interesting area of future research.
In our modeling of TCS, we focused solely on the time from hospital admission to clinical stability and included inhospital mortality as a competing risk. Hospital discharge was not included as an additional competing risk, which is reasonable given the definition of time of clinical stability as the time the criteria for switching from intravenous to oral antibiotic therapy was met. In the competing risks model, each outcome is treated as an absorbing state, so that transitions do not occur after reaching these outcomes. In interest is solely in the time that clinical stability is reached, then this model is reasonable. However, an extended modeling for clinical stability and subsequent discharge and/or inhospital mortality can be constructed, using a multistate model which allows transitions from the clinically stable state to these other two outcomes. The model would be similar to that used for modeling nosocomial infections in Beyersmann et al. [12], c.f. Figure 1 in that reference. In such a model, the incidence rate, the incidence proportion, and the prevalence of patients who are clinically stable at/by a given time can all be addressed. However, when competing risks are present, care must be taken in intrepreting the results, as the rate of the competing event (mortality) can result in apparently conflicting results between the incidence rate and proportion of clinically stable patients (see [12], Section 3.2, for a detailed discussion and analysis).
Lastly, in our evaluation of methods for handling mortality we did not discuss the issue of incorporating additional risk factors, which can be done using a regression model. When competing risks are present, regression modeling focuses on either Cox models [50] for the causespecific hazards, or modeling the effect of covariates on the cumulative incidence function [16, 51]. However, modeling based on causespecific hazards are difficult to interpret in terms of the effect on the cumulative incidence function, as all causespecific hazards models must be considered simultaneously. In contrast, proportional causespecific hazards does not imply proportional subdistribution hazards, and when the former holds models based on the latter criterion will be misspecified [52]. Extensive comparisons between the two methods have been conducted by several authors [52, 53], and Grambauer et al. [52] offers a robust approach for interpreting subdistribution models based on a timeaveraged effect of the subdistribution hazard ratio (the least false parameter).
Conclusions
This paper investigates mechanisms for handling inhospital mortality when analyzing length of hospital stay (LOS) or time to clinical stability (TCS), using data from patients admitted to the hospital with communityacquired pneumonia. Two currently used adhoc approaches, restricting analysis to those patients who lived and assigning individuals who die the worst outcome (longest LOS or TCS), gave disparate results when applied to the same data set and are discouraged from use. In contrast, estimators based on treating mortality as a competing risk have clinically relevant interpretations. Additionally, the incidence of mortality can be compared simultaneously with that of discharge / clinical stability, for more comprehensive comparisons between patient populations. These estimators have been readily available in the literature for over thirty years, yet still are frequently overlooked when analyzing timetoevent outcomes in the presence of competing risks. With the ready availability of software for these estimators and their straightforward interpretation, there is no reason to eschew them in favor of other adhoc estimators that may be considered. We provide illustrative statistical code as supplemental material for investigators to use in their own studies, to promote use of these estimators in practice and improve compatibility between studies that are investigating these timetoevent outcomes. Interested readers are also referred to the many excellent articles in the literature [1, 10, 12, 14] for followup on this topic.
Appendix
Equivalence of 'worst outcome' and cumulative incidence estimators
The complement of the KM estimator based on the subdistribution hazard has been previously shown to be equivalent to the cumulative incidence estimator [25, 26], accounting for both general rightcensoring and lefttruncation. Here, we give a simplified proof of this equality for the special case of administratively rightcensored data (that is, the data are fully observed until the end of the followup period). It is evident that the two estimators ${\hat{CI}}_{1}\left(t\right)$ and $1{\u015c}_{1}^{W}\left(t\right)$ have jumps at the same event times, therefore it is sufficient to prove equality of the jump sizes to prove equality of the two estimators. That is, we need to show that
for all times i = 1,..., k, where ${Y}_{0}^{*}\left({t}_{i}\right)={Y}_{0}\left({t}_{i}\right)+{N}_{02}\left({t}_{i1}\right)$.
The proof goes by induction. Consider the first jump (i.e., the first 0 → 1 transition), at time ${t}_{{i}^{*}}$. If the first overall event is a 0 → 1 transition, then the two jump sizes are trivially equal since $\u015c\left({t}_{{i}^{*}}\right)={\u015c}_{1}^{W}\left({t}_{{i}^{*}}\right)=1$ and ${Y}_{0}\left({t}_{i}\right)={Y}_{0}^{*}\left({t}_{i}\right)=N$, the initial sample size. If instead the first observed transition is 0 → 2, then the righthand side (RHS) of (8) is $\left\{{Y}_{0}\left({t}_{{i}^{*}}\right)\u2215N\right\}\left\{\Delta {N}_{01}\left({t}_{{i}^{*}}\right)\u2215{Y}_{0}\left({t}_{{i}^{*}}\right)\right\}=\Delta {N}_{01}\left({t}_{{i}^{*}}\right)\u2215N$, equivalent to the LHS. Assuming equality of the jumps holds for time t _{ i }, then for time t _{ i+1 }we have for the RHS of (8):
which completes the proof.
Abbreviations
 The following is a list of the abbreviations used throughout the manuscript:

CAP:CommunityAcquired Pneumonia
 CAPO :

CommunityAcquired Pneumonia Organization
 CI :

Cumulative Incidence
 CRAN :

Comprehensive R Archive Network
 HR :

Hazard Ratio
 KM :

KaplanMeier
 LOS :

Length of Stay
 PSI :

Pneumonia Severity Index
 RC :

Risk Class
 and TCS :

Time to Clinical Stability.
References
 1.
Beyersmann J, Gastmeier P, Grundmann H, Barwolff S, Geffers C, Behnke M, Ruden H, Schumacher M: Use of multistate models to assess prolongation of intensive care unit stay due to nosocomial infection. Infect Control Hosp Epidemiol. 2006, 27 (5): 4939. 10.1086/503375.
 2.
Arnold F, LaJoie A, Marrie T, Rossi P, Blasi F, Luna C, Fernandez P, Porras J, Weiss K, Feldman C, Rodriguez E, Levy G, Arteta F, Roig J, Rello J, Ramirez J: The pneumonia severity index predicts time to clinical stability in patients with communityacquired pneumonia. Int J Tuberc Lung Dis. 2006, 10 (7): 73943.
 3.
Arnold FW, Brock GN, Peyrani P, Rodriguez EL, Diaz AA, Rossi P, Ramirez JA: Predictive accuracy of the pneumonia severity index vs CRB65 for time to clinical stability: results from the CommunityAcquired Pneumonia Organization (CAPO) International Cohort Study. Respir Med. 2010, 104 (11): 173643. 10.1016/j.rmed.2010.05.022.
 4.
Fishbane S, Niederman MS, Daly C, Magin A, Kawabata M, de CorlaSouza A, Choudhery I, Brody G, Gaffney M, Pollack S, Parker S: The impact of standardized order sets and intensive clinical case management on outcomes in communityacquired pneumonia. Arch Intern Med. 2007, 167 (15): 16649. 10.1001/archinte.167.15.1664.
 5.
Menendez R, Torres A, Rodriguez de Castro F, Zalacain R, Aspa J, Martin Villasclaras JJ, Borderias L, Benitez Moya JM, RuizManzano J, Blanquer J, Perez D, Puzo C, SanchezGascon F, Gallardo J, Alvarez CJ, Molinos L: Reaching stability in communityacquired pneumonia: the effects of the severity of disease, treatment, and the characteristics of patients. Clin Infect Dis. 2004, 39 (12): 178390. 10.1086/426028.
 6.
Silber SH, Garrett C, Singh R, Sweeney A, Rosenberg C, Parachiv D, Okafo T: Early administration of antibiotics does not shorten time to clinical stability in patients with moderatetosevere communityacquired pneumonia. Chest. 2003, 124 (5): 1798804. 10.1378/chest.124.5.1798.
 7.
Bordon J, Peyrani P, Brock GN, Blasi F, Rello J, File T, Ramirez J: The presence of pneumococcal bacteremia does not influence clinical outcomes in patients with communityacquired pneumonia: results from the CommunityAcquired Pneumonia Organization (CAPO) International Cohort study. Chest. 2008, 133 (3): 61824. 10.1378/chest.071322.
 8.
Shindo Y, Sato S, Maruyama E, Ohashi T, Ogawa M, Imaizumi K, Hasegawa Y: Implication of clinical pathway care for communityacquired pneumonia in a community hospital: early switch from an intravenous betalactam plus a macrolide to an oral respiratory fluoroquinolone. Intern Med. 2008, 47 (21): 186574. 10.2169/internalmedicine.47.1343.
 9.
Kalbfleisch JD, Prentice RL: The Statistical Analysis of Failure Time Data. 2002, New Jersey: WileyInterscience, 2
 10.
Allignol A, Schumacher M, Wanner C, Drechsler C, Beyersmann J: Understanding competing risks: a simulation point of view. BMC Med Res Methodol. 2011, 11: 8610.1186/147122881186.
 11.
Klein J, Rizzo J, Zhang MJ, Keiding N: Statistical methods for the analysis and presentation of the results of bone marrow transplants. Part I: unadjusted analysis. Bone Marrow Transplant. 2001, 28: 909915. 10.1038/sj.bmt.1703260.
 12.
Beyersmann J, Wolkewitz M, Allignol A, Grambauer N, Schumacher M: Application of multistate models in hospital epidemiology: advances and challenges. Biom J. 2011, 53 (2): 33250. 10.1002/bimj.201000146.
 13.
Allignol A, Schumacher M, Beyersmann J: A note on variance estimation of the AalenJohansen estimator of the cumulative incidence function in competing risks, with a view towards lefttruncated data. Biom J. 2010, 52: 12637. 10.1002/bimj.200900039.
 14.
Putter H, Fiocco M, Geskus RB: Tutorial in biostatistics: competing risks and multistate models. Stat Med. 2007, 26 (11): 2389430. 10.1002/sim.2712.
 15.
Gray R: A class of Ksample tests for comparing the cumulative incidence of a competing risk. Ann Stat. 1988, 16: 11411154. 10.1214/aos/1176350951.
 16.
Fine JP, Gray RJ: A proportional hazards model for the subdistribution of a competing risk. J Am Stat Assoc. 1999, 94 (446): 496509. 10.2307/2670170.
 17.
Anderson PK, Keiding N: Interpretability and importance of functionals in competing risks and multistate models. Tech. rep., Dept of Biostatistics, Univ of Copenhagen. 2010, [https://intra.ifsv.ku.dk/biostat_annualreport/images/5/54/Research_Report_1006.pdf]
 18.
Arnold FW, LaJoie AS, Brock GN, Peyrani P, Rello J, Menendez R, Lopardo G, Torres A, Rossi P, Ramirez JA: Improving outcomes in elderly patients with communityacquired pneumonia by adhering to national guidelines: CommunityAcquired Pneumonia Organization International cohort study results. Arch Intern Med. 2009, 169 (16): 151524. 10.1001/archinternmed.2009.265.
 19.
Volk ML, Reichert HA, Lok AS, Hayward RA: Variation in Organ Quality between Liver Transplant Centers. Am J Transplant. 2011, 11 (5): 95864. 10.1111/j.16006143.2011.03487.x.
 20.
Klein JP, Moeschberger ML: Survival analysis: techniques for censored and truncated data. 2003, New York: SpringerVerlag, 2
 21.
Kaplan EL, Meier P: Nonparametric estimation from incomplete observations. J Am Stat Assoc. 1958, 53: :457481. 10.2307/2281868.
 22.
Aalen O, Johansen S: An empirical transition matrix for nonhomogeneous Markov chains based on censored observations. Scand J Stat. 1978, 5: 141150.
 23.
Braun TM, Yuan Z: Comparing the small sample performance of several variance estimators under competing risks. Stat Med. 2007, 26 (5): 117080. 10.1002/sim.2661.
 24.
Gray R: cmprsk: Subdistribution Analysis of Competing Risks. 2011, [R package version 2.22], [http://cran.rproject.org/web/packages/cmprsk/index.html]
 25.
Geskus RB: Causespecific cumulative incidence estimation and the fine and gray model under both left truncation and right censoring. Biometrics. 2011, 67: 3949. 10.1111/j.15410420.2010.01420.x.
 26.
Zhang X, Zhang MJ, Fine JP: A mass redistribution algorithm for rightcensored and lefttruncated time to event data. J Stat Plan Infer. 2009
 27.
Breslow NE: Analysis of survival data under the proportional hazards model. International Statistics Review. 1975, 43: 4558. 10.2307/1402659.
 28.
Arnold FW, Summersgill JT, Lajoie AS, Peyrani P, Marrie TJ, Rossi P, Blasi F, Fernandez P, File JTM, Rello J, Menendez R, Marzoratti L, Luna CM, Ramirez JA: A worldwide perspective of atypical pathogens in communityacquired pneumonia. Am J Respir Crit Care Med. 2007, 175 (10): 108693. 10.1164/rccm.200603350OC.
 29.
Niederman MS, Mandell LA, Anzueto A, Bass JB, Broughton WA, Campbell GD, Dean N, File T, Fine MJ, Gross PA, Martinez F, Marrie TJ, Plouffe JF, Ramirez J, Sarosi GA, Torres A, Wilson R, Yu VL: Guidelines for the management of adults with communityacquired pneumonia. Diagnosis, assessment of severity, antimicrobial therapy, and prevention. Am J Respir Crit Care Med. 2001, 163 (7): 173054.
 30.
Fine MJ, Auble TE, Yealy DM, Hanusa BH, Weissfeld LA, Singer DE, Coley CM, Marrie TJ, Kapoor WN: A prediction rule to identify lowrisk patients with communityacquired pneumonia. N Engl J Med. 1997, 336 (4): 24350. 10.1056/NEJM199701233360402.
 31.
Beyersmann J, Latouche A, Buchholz A, Schumacher M: Simulating competing risks data in survival analysis. Stat Med. 2009, 28 (6): 95671. 10.1002/sim.3516.
 32.
R Development Core Team: R: A Language and Environment for Statistical Computing. 2011, R Foundation for Statistical Computing, Vienna, Austria, [http://www.rproject.org]
 33.
Scrucca L, Santucci A, Aversa F: Competing risk analysis using R: an easy guide for clinicians. Bone Marrow Transplant. 2007, 40 (4): 3817. 10.1038/sj.bmt.1705727.
 34.
Allignol A, Schumacher M, Beyersmann J: Empirical transition matrix of multistate models: the etm package. J Stat Softw. 2011, 38:
 35.
Ferguson N, Brock G, Datta S: msSurv: Nonparametric estimation for multistate models. 2011, [R package version 1.02], [http://cran.rproject.org/web/packages/msSurv/index.html]
 36.
de Wreede LC, Fiocco M, Putter H: mstate: an R package for the analysis of competing risks and multistate models. J Stat Softw. 2011, 38:
 37.
CRAN Task View: Survival Analysis. [http://cran.rproject.org/web/views/Survival.html]
 38.
Efron B: The two sample problem with censored data. Proceedings of the fifth Berkeley Symposium, Vol 4. 1967, Berkeley, CA: University of California Press, 831853.
 39.
Satten GA, Datta S: KaplanMeier representation of competing risk estimates. Stat Probabil Lett. 1999, 42: :299304. 10.1016/S01677152(98)00220X.
 40.
Datta S, Satten GA, Datta S: Nonparametric estimation for the threestage irreversible illnessdeath model. Biometrics. 2000, 56 (3): 8417. 10.1111/j.0006341X.2000.00841.x.
 41.
Lan L, Datta S: Nonparametric estimation of state occupation, entry and exit times with multistate current status data. Stat Methods Med Res. 2010, 19 (2): 14765. 10.1177/0962280208094278.
 42.
Pepe MS, Mori M: KaplanMeier, marginal or conditional probability curves in summarizing competing risks failure time data?. Stat Med. 1993, 12 (8): 73751. 10.1002/sim.4780120803.
 43.
Bentzen SM, Vaeth M, Pedersen DE, Overgaard J: Why actuarial estimates should be used in reporting late normaltissue effects of cancer treatment ... now!. Int J Radiat Oncol Biol Phys. 1995, 32 (5): 15314. 10.1016/03603016(95)00262W.
 44.
Beyersmann J, Gastmeier P, Grundmann H, Barwolff S, Geffers C, Behnke M, Ruden H, Schumacher M: Transmissionassociated nosocomial infections: prolongation of intensive care unit stay and risk factor analysis using multistate models. Am J Infect Control. 2008, 36 (2): 98103. 10.1016/j.ajic.2007.06.007.
 45.
Wolkewitz M, Beyersmann J, Gastmeier P, Schumacher M: Modeling the effect of timedependent exposure on intensive care unit mortality. Intensive Care Med. 2009, 35 (5): 82632. 10.1007/s0013400914236.
 46.
Frangakis CE, Rubin DB: Principal stratification in causal inference. Biometrics. 2002, 58: 219. 10.1111/j.0006341X.2002.00021.x.
 47.
Rubin DB: Causal inference through potential outcomes and principal stratification: application to studies with "censoring" due to death. Statistical Science. 2006, 21 (3): 299309. 10.1214/088342306000000114.
 48.
Zhang JL, Rubin DB, Mealli F: Using the EM algorithm to estimate the effects of job training programs on wages. 55th Session of the International Statistical Institute. 2005
 49.
Zhang JL, Rubin DB, Mealli F: Evaluating the effects of training programs on wages through principal stratification. Modelling and Evaluating Treatment Effects in Econometrics. Edited by: Millimet D, Smith J, Vytlacil E. 2008, Amsterdam: Elsevier
 50.
Cox D: Regression models and lifetables (with discussion). J Roy Stat Soc. 1972, B34: 187220.
 51.
Klein JP: Modelling competing risks in cancer studies. Stat Med. 2006, 25 (6): 101534. 10.1002/sim.2246.
 52.
Grambauer N, Schumacher M, Beyersmann J: Proportional subdistribution hazards modeling offers a summary analysis, even if misspecified. Stat Med. 2010, 29 (78): 87584. 10.1002/sim.3786.
 53.
Latouche A, Boisson V, Chevret S, Porcher R: Misspecified regression model for the subdistribution hazard of a competing risk. Stat Med. 2007, 26 (5): 96574. 10.1002/sim.2600.
Prepublication history
The prepublication history for this paper can be accessed here:http://0www.biomedcentral.com.brum.beds.ac.uk/14712288/11/144/prepub
Acknowledgements
This research was supported in part by the National Institutes of Health [P30ES014443 and
P20RR/DE177702 for GNB], [1R03OH00895701A2, PO2 728 0800015499, RSGHP0909901CPHP for JM]. The authors gratefully acknowledge the work of the CAPO investigators in building and maintaining the CAPO data set (see Additional File 5).
Author information
Additional information
Competing interests
The authors declare that they have no competing interests.
Authors' contributions
GNB wrote the manuscript, performed the data analysis, and created the supplemental material. CB performed the simulation studies. JAR provided the CAPO data and clinical insight to the problem. JM originally conceived of the problem and supervised the research. All authors helped with drafting the manuscript, and read and approved the final draft.
Electronic supplementary material
Authors’ original submitted files for images
Below are the links to the authors’ original submitted files for images.
Rights and permissions
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
About this article
Cite this article
Brock, G.N., Barnes, C., Ramirez, J.A. et al. How to handle mortality when investigating length of hospital stay and time to clinical stability. BMC Med Res Methodol 11, 144 (2011) doi:10.1186/1471228811144
Received
Accepted
Published
DOI
Keywords
 Cumulative Incidence
 Clinical Stability
 High Discharge Rate
 Pneumonia Severity Index
 Cumulative Incidence Function