Introduction
An estimated 2.7 million people in the United Kingdom (UK) are reported to live with heart disease, of which approximately 900 000 suffer from heart failure (http://www.heartstats.org accessed 1 September 2005). As the majority of heart failure victims tend to be elderly, the increase in the ratio of older people in the population will result in higher numbers of hospital admissions over the forthcoming years. At present it is estimated that direct medical treatment for heart failure costs the UK National Health Service (NHS) approximately £625 million. As well as an increase in the number of people suffering from heart failure, due to advances in medical and surgical treatments, the percentage of patients dying as a result of it has dramatically reduced over the past 30 years. This has increased the percentage of patients requiring post-failure rehabilitation and care, exerting greater pressures on hospital managers and clinicians to allocate resources in an effective manner. It has been recognized that hospital length of stay (LOS) is a reliable indicator for measuring the consumption of these resources (Vasilakis and Marshall, 2005). This paper considers the development of a model for the LOS of heart failure patients in hospital using a special type of Markov model.
Previous measures used to analyse patient behaviour in hospital, such as average LOS, are becoming more widely recognised as being less reliable due to their poor representation of skewed LOS data. More representative deterministic compartmental models (Harrison and Millard, 1991; Taylor et al, 1996), stochastic compartmental models (Irvine and McClean, 1994) and models using survival distributions (McClean and Millard, 1993, Etzioni et al, 1999) have been developed to account for the non-normality of the distribution and hence capture the heterogeneity of the survival data. Compartmental models have been used to represent the movement of patients through a hospital by different states, or compartments. From a clinical point of view, these states represent different stages of care a patient undergoes, for example short- and long-term care, where each stage of care has very distinct resource needs. The occupancy time of a group of patient through these states can be represented using mixed exponential distributions. While compartmental models use census data and permit the movement of patients in any direction between states, the Coxian phase-type distribution is a more specific method that represents LOS data as a special type of Markov model (Cox, 1955). The Coxian phase-type distribution models a patient's LOS using any number of sequential states, dependent on the fit of the distribution from the data. Faddy and McClean (1999) have shown that the Coxian phase-type distribution provides a good fit to the LOS of geriatric patients in hospital, where the different transient phases of the distribution represent the severity of the illness of the patient; while Aalen (1995) has used it to model the incubation time of AIDS.
This paper proposes modelling the LOS of patients admitted to hospital suffering from heart failure using the Coxian phase-type distribution. The ability to stochastically model the transition of patients through the different stages of care allows a real-world situation to be more accurately represented than other deterministic models, and allows the expected number of patients and expected LOS in each stage of care to be estimated. The model assumes that the ward is working to maximum capacity and retains a constant size, a situation that would occur if there was a waiting list of patients to be admitted to hospital. The data used to illustrate the methodology (http://www.am.qub.ac.uk/users/b.shaw/heartlosdata.out accessed 12 April 2006) refers to 971 patients admitted to a Belfast hospital, Northern Ireland, UK between 2000 and 2004, suffering from congestive heart failure. Their LOS ranges from 0 (less than 1 day) to 297 days, with an average and median LOS of 12.9 and 8 days, respectively. The paper focuses on using the fitted model to (i) calculate the number of patients in each stage of care assuming the hospital ward has reached steady state, (ii) determine the number of patients still receiving care after t days and (iii) to investigate the expected turnover of patients during some specified time period. These calculations have previously been derived for a two- and three-stage compartmental model by Irvine and McClean (1994) and Taylor (1997) who analysed census data for the admission of geriatric patients. The derivations and results presented in this paper use LOS data and account for the properties exhibited by the special case Coxian phase-type distribution.
The model
A Coxian phase-type distribution describes the time to absorption of a finite Markov chain in continuous time, where there is one absorbing state (or phase) and the process starts in the first of k transient states, see Figure 1. The process sequentially moves through the ordered transient states, with the choice of departing into the absorbing state k+1 at any time.
The parameters of the Coxian phase-type distribution, the
is and the
is, which are estimated from the data, describe the transition rates through the ordered transient states and the transition rates from the transient states to the absorbing state, respectively. In terms of the patient's duration of stay in hospital, the patients are admitted into phase 1 and their movement through the transient phases could represent an increasing severity of illness being treated, with the absorbing phase representing discharge or death. Absorption from the earlier phases would then represent the end of treatment for a patient with an acute severity of illness, while absorption from later phases would represent the conclusion of treatment for those patients with a more severe illness. The probability density function (PDF) of the Coxian phase-type distribution for time t is given by

where p is a 1
k vector of probabilities defining the initial transient phases and q is a k
1 vector of rates from the transient states to the absorbing state. The phase-type generator matrix, Q, a sub-matrix of the infinitesimal transition generator matrix, is given by

The transition rates in Q represent the transitions confined to the transient phases; for example,
1 in row one, column two represents the rate of movement from phase 1 to 2. The zeros in row 1 indicate that the Coxian phase-type distribution does not permit direct movement from phase 1 to g, where g={3,4,...,k}.
Fitting the model
The Coxian phase-type distribution is fitted to the LOS data for those patients suffering from heart failure. MATLAB (MATLAB, 2004) is used to implement an optimization function which performs the method of maximum likelihood estimation to sequentially determine the log-likelihood for a 1-phase distribution, then a 2-phase distribution and so on. By taking into consideration both the fit of the model to the data and the complexity of the model, the minimum Bayesian Information Criterion (Schwarz, 1978) is used to decide the most appropriate number of phases. The corresponding parameter estimates of the distribution are also obtained. Table 1 displays both the fitted parameters and the BIC score for each of the different models investigated. It can be seen that the most suitable number of phases is 3, indicated by the minimum BIC score of 6796. Other model selection techniques, AIC (Akaike, 1974) and the likelihood ratio test (Rohatgi, 1976), result in the same model being chosen.
The parameters in Table 1 may then be used along with (1) to derive the PDF of the fitted Coxian phase-type distribution as

Figure 2 illustrates the empirical data of the patients' LOS with the superimposed fitted 3-phase distribution. In order to test the goodness of fit of the model, a
2 test is carried out, comparing the expected and observed number of patients still in hospital for different cohorts of patients admitted during 3-month periods. The test concludes that the model captures the data well at the 5% significance level (
2=1.50, d.f.=1). The 3-phase distribution produces a more accurate fit to this particular data set than many other distributions commonly associated with survival analysis, such as the gamma, lognormal and Weibull distributions. As well as providing a better fit, the Coxian phase-type distribution also provides an intuitive graphical representation of a statistical distribution, where clinicians may visualize and understand the flow of patients through the different components of care.
The expected LOS in each of the three phases is 3, 8 and 45 days, respectively. From a clinical point of view, these phases could be interpreted roughly as short-, medium- and longer-term care, or acute-care, rehabilitation and long-stay care. Short-term care usually consists of continuous heart monitoring through a series of tests and the administration of basic medication, while progression to longer-term care may be indicative of the patient requiring intense treatment, perhaps even surgery for a heart bypass or transplant. In order to determine the number of patients initially in each of these phases, it is assumed that the ward continues to function at maximum capacity (remains a constant size). This would be achieved by immediately replacing any discharges with the same number of new admissions.
Determining the number of patients in each stage of care
The procedure adopted is to consider the growth of a new ward until the flow of patients through each phase reaches an equilibrium level (a steady state). By only allowing new admissions at time t=0, an analysis is carried out on how the number of patients in each stage of care regulates to some level as
. This model is represented by Figure 3, where patients who are discharged from any stage of care within the ward are fed back into phase 1 to maintain the system at a constant size.
For a continuous Markov model, it can be shown (Grimmett and Stirzaker, 2001) that

where P(t)=[pij(t)] is a matrix of transition probabilities between each of the phases and pij(t) is the probability that a patient is in state j at time t, given that they were in phase i at time t=0. S is the (infinitesimal) generator matrix of a continuous time Markov chain. For the constant size model shown in Figure 3, the generator matrix is given by

which if substituted into (4) can be solved (Moler and Van Loan, 1978) to derive P(t). Assuming a hypothetical ward of capacity 40 beds, as
the number of patients in stage j is given by nj=n1(0)p1j(t), where n1(0) is the number of patients admitted into the new ward at t=0. Figure 4 illustrates the number of patients in each stage of care at time t as the system reaches steady state. For this particular data set, steady state is achieved after a relatively short period of time, however similar applications for different healthcare data sets have shown that steady state may take as long as 5 years (El-Darzi et al, 1998).
Once the ward reaches equilibrium, the numbers of patients initially in short-, medium- and longer-term care are 8, 22 and 10, respectively. Interpreting this in a clinical sense, there are fewer heart failure patients who could be perceived as short- term care patients. The majority of patients (55%), considered to be medium-term patients (80% of BCH patients stayed longer than 3 days, 65% longer than 5 days), require more than basic medical care. Fewer patients remain in hospital for longer-term care.
Determining the number of patients still in hospital after t days
The probability of patients being in each phase at time t is considered in order to study how long these patients occupy a bed in hospital. The dynamics of the steady state system can now be represented by Figure 1. The phase type generator matrix, Q, given by (2) can now be defined for a 3-phase distribution as

As the Coxian phase-type distribution is a special type of continuous Markov model, (4) holds if the matrix S is replaced by the matrix Q above. (4) can then be solved to give the following transitional probabilities:

Due to the sequential movements through the phases of the Coxian phase-type distribution, p21=p31=p32=0. If
is the expected number of patients in phase j at time t and nm=nm(0) is the initial number of patients in phase m, as calculated for the steady-state system, then

and the total expected number of patients still in hospital at time t,
, is calculated by summing
over j where 1
j
k. This may be equivalently calculated using
where S(t) is the survivor function for the Coxian phase-type distribution. Table 2 displays the number of patients still in hospital for different values of t, while Figure 5 illustrates these results graphically.
Investigating the expected turnover
The opening of a new ward is now considered, where the assumption is made that all beds are initially empty (at t=0) but can be filled immediately. The objective is to determine the expected number of patients required to maintain the ward at a constant size during a specified time period (0,t). There are two techniques to model this and they are the following:
- a straightforward method using the average LOS (ALOS) of a patient in hospital and
- a method that takes into account the distribution of the patient LOS.
Given the number of beds available in a hospital ward, say n, and the ALOS spent by a group of patients, the mean number of admissions required to maintain the ward at a constant size during the interval (0,t),
, can be calculated using

The mean daily number of new admissions is calculated by substituting t=1 into (9). Using the ALOS (12.9 days) for the BCH congestive heart failure patients and a theoretical ward size of 40 beds, the mean daily turnover is 3.1 patients. The ALOS however fails to capture the distribution of patient LOS and may produce results misleading to a hospital manager allocating resources. If the distribution was modelled using the Coxian phase-type distribution, could healthcare administrators allocate their resources in a way to cater for a greater number of admissions than if they used ALOS?
Applying renewal theory to this question, new admissions into the ward would represent renewals into a system. The Laplace transform of the pdf of the Coxian phase-type distribution is given by

where I is a k
k identity matrix for a k-phase distribution. For a 3-phase distribution, f*(s) is given by

Taking the inverse Laplace transform of H*(s), given by

the function H(t) can be derived, which is the mean number of renewals in the time interval (0,t) for a system with one server (hospital with one bed) (Cox, 1962). For the 3-phase Coxian phase-type distribution H(t) is given by

where


and

Using the distribution of LOS to model a ward with n beds, the mean number of admissions required to keep the ward at a constant size during the interval (0,t),
D(t), is given by

Using (13), where the parameters of the fitted distribution are given in Table 1, with (17), the mean number of new admissions required after the first day is 1.87 patients, compared to 3.1 patients using the ALOS method. On the 2nd day, this number increases to 2.59 patients. As
the mean number of admissions per day tends to the corresponding value when using ALOS. However, while the mean number of admissions per day remains at a constant 3.1 patients when using the ALOS, a greater number of admissions in the earlier days can be permitted when using the distribution of patient LOS, as seen from Figure 6. This has significant consequences on the total number of admissions that can be admitted to the ward over a specified period, as illustrated in Table 3.
The mean turnover of patients in the first 20 days increases by 10.3% from 62.0 to 68.4 simply by accounting for the distribution of patient LOS. After 100 days, this difference is 6.25%. As
this difference becomes minimal however, through neglect of the new admissions' LOS distribution.
Conclusion
It is projected that the percentage of elderly people making up the total population will more than double over the next 50 years (US Census Bureau, 2001), resulting in many more individuals requiring hospital treatment for heart failure. As a result, medical resources will need to be allocated in an efficient manner. Many of the methods currently in use for allocating clinical resources in hospitals are considered to be misleading, inaccurate and flawed (Ivatts and Millard, 2002), assuming the homogeneous movement of patients through the hospital and ignoring any case mix of patients that may actually exist. This paper illustrates how the Coxian phase-type distribution provides an accurate modelling technique for the LOS of patients admitted to a Belfast hospital suffering from heart failure, where the patient can be thought as passing through one, two or three different stages of care. The number of phases is determined from the distribution of the data and therefore, when considering the LOS of heart failure patients from a different hospital, although the theory and ideas presented in this paper would still be valid, appropriate alternations may be required to take into consideration any change in the number phases. By assuming that any discharges are immediately replaced by new admissions, the ward can be thought of as working to maximum capacity and the expected number of patients in each stage of care calculated. When this steady state is reached, the expected number of patients still in hospital after t days was calculated. Using renewal theory, it was shown that the mean number of admissions required to maintain the ward at a constant size over the time period (0,20) increased by approximately 10% by taking account of the LOS distribution. The results presented in this paper have shown that, by modelling patient LOS in hospital using more sophisticated techniques than simple averages, the flow of patients through a hospital is modelled more accurately. If patient behaviour in hospital were more accurately modelled, perhaps medical resources could be more efficiently managed.
References
- Aalen O (1995). Phase type distributions in survival analysis. Scand J Stat 22: 447–463.
- Akaike H (1974). A new look at statistical model identification. IEEE Trans Automat Control 19: 716–722. | Article |
- Cox DR (1955). A use of complex probabilities in the theory of stochastic processes. Proc Cambridge Philos Soc 51: 310–313.
- Cox DR (1962). Renewal Theory. Methuen & Co: London.
- El-Darzi E, Vasilakis C, Chaussalet T and Millard PH (1998). A simulation modelling approach to evaluating length of stay, occupancy, emptiness and bed blocking in a hospital geriatric department. Health Care Mngt Sci 1: 143–149. | Article | ChemPort |
- Etzioni RD et al. (1999). On the use of survival analysis techniques to estimate medical care costs. J Health Econ 19: 365–380. | Article |
- Faddy M and McClean SI (1999). Analysing data on lengths of stay of hospital patients using phase-type distributions. Appl Stochastic Models Busi Indust 15: 311–317. | Article |
- Grimmett G and Stirzaker D (2001). Probability and Random Processes. Oxford University Press Ltd: Oxford.
- Harrison G and Millard PH (1991). Balancing acute and long term care: the mathematics of throughput in departments of geriatric medicine. Methods Inform Med 30: 221–228. | ChemPort |
- Irvine V and McClean SI (1994). Stochastic models for geriatric inpatient behaviour. IMA J Math Appl Med Biol 11: 207–216. | PubMed | ChemPort |
- Ivatts S and Millard PH (2002). Health care modeling—why should we try?. Br J Heath Care Mngt 8(6): 218–222.
- MATLAB (2004). Reference Guide. The Math Works Inc. Natick, MA, USA.
- McClean SI and Millard PH (1993). Patterns of length of stay after admission in geriatric medicine: an event history approach. Statistican 42: 263–274. | Article |
- Moler C and Van Loan C (1978). Nineteen dubious ways to compute the exponential of a matrix. SIAM Rev 20(4): 801–836. | Article |
- Rohatgi VK (1976). An Introduction to Probability Theory and Mathematical Statistics. Wiley: New York.
- Schwarz G (1978). Estimating the dimension of a model. Ann Stat 6(2): 461–464. | ISI |
- Taylor G (1997). Geriatric-patient flow-rate modelling, PhD thesis, University of Ulster.
- Taylor G, McClean SI and Millard P (1996). Geriatric-patient flow-rate modelling. IMA J Math Appl Med Biol 13: 297–307. | PubMed | ChemPort |
- US Census Bureau (2001). An Aging World: International Population Reports.
- Vasilakis C and Marshall AH (2005). Modelling nationwide hospital length of stay: opening the black box. J Opl Res Soc 56: 862–869. | Article |


