The COVID-19 pandemic has disrupted hospital operations the world over. Large influxes of patients requiring intensive care and mechanical ventilation have overwhelmed capacity, forced hospitals to triage, and have been associated with significantly elevated case fatality rates. Shortages of personal protective equipment (PPE) have exposed healthcare workers to additional risk and many have contracted COVID-19 and died.
Hospitals managers have a variety of options to increase total and available capacity when planning for an influx of COVID-19 patients [1] . Managers may be able to increase total capacity by calling in additional nurses and doctors, opening previously closed beds, and acquiring additional PPE. Managers may be able to increase available capacity by expediting patient discharge or canceling or delaying non-discretionary, non-urgent patient admissions [2] . The potential detriments to the quality of care and higher costs associated with these actions may be partially or fully mitigated if the decision to act is made with sufficient lead time. In the worst-case scenario when a hospital has insufficient intensive care unit (ICU) or ventilator capacity, patients with COVID-19 may experience significantly higher case mortality rates [3] . In less dire scenarios, nurses called in to work on short notice may require overtime pay while those scheduled a week in advance may not; PPE is less expensive when its purchase is not expedited; and patients whose non-urgent procedures are scheduled for later will experience less disruption than patients whose procedures are cancelled on short notice. In the United States, where health-care is paid for through a combination of private and public insurance, the pandemic has created the additional challenge of significant financial stress as COVID-19 patients are associated with lower rates of reimbursement than patients who receive nonurgent, non-discretionary procedures such as tumor removal surgery or chemotherapy [4] .
The complementary challenges of ensuring sufficient capacity to meet the demand associated with COVID-19 while avoiding unnecessarily long delays to non-COVID-19 care, require hospital managers to generate forecasts of the volume of COVID-19 patients requiring care at their institution. Managerial decisions based on forecasts of COVID-19 may benefit from the availability of the forecast with as much lead time as possible. To allow managers to account for the asymmetric risk associated with having insufficient capacity to meet urgent COVID-19 demand or non-urgent procedural demand, such forecasts should provide probabilistic, rather than point, estimates.
Our methodology reflects the random fluctuations that arise at the hospital level that are averaged out at the regional level. For example, if a hospital receives, on average, 5% of a county's hospitalization and the forecast county hospitalization level is 100, the random fluctuation about the mean hospital load of 5 patients can be significant (in a relative error sense). In particular our methodology provides a prediction interval on the number of COVID-19 positive patients at a given hospital rather than a "point forecast". In addition, our methodology takes into account the additional uncertainty induced by estimation error associated with estimating the underlying statistical parameters from observed data. This paper is concerned with developing statistical methods to support hospital decision making with regard to COVID-19 capacity planning issues. In particular, hospital leadership can benefit from statistical tools to help them assess the amount of capacity that will need to be assigned to coronavirus patients in the weeks to come. A serious complication is that epidemiological forecasts typically focus on aggregate COVID-19 predictions that are provided at the regional level. For example, in California, the available COVID-19 forecasts are provided at the county level. Our goal in this paper is to provide a statistically principled methodology for obtaining hospital-level coronavirus hospitalization forecasts from such regional forecasts. A simple example is illustrative.
Consider a hospital preparing for a forecast influx of COVID-19 patients. Suppose the hospital can accommodate up to 20 COVID-19 patients with its current capacity, 21-30 COVID-19 patients by calling in additional staff, and over 30 patients by cancelling scheduled procedures. A forecast that the hospital will have to accommodate 25 . Given a regional forecast for the daily number of hospitalizations as well as historical data on the share of regional hospitalizations accommodated by a specific hospital, all assumed to be Poisson random variables, we develop a forecast model DICE (Demand Intervals from Consistent Estimators). The primary contributions of this paper are as follows.
-We show that DICE is consistent under mild assumptions and suitable for use with biased and unbiased regional forecasts. -We show that DICE performed well on empirical data from a large academic medical center in California as well as on synthetic data. -We describe the COVID-19 related capacity management decisions facilitated by the use of DICE.
Numerous COVID forecasting models have been developed since the start of the pandemic. Among them, many forecast regional-level COVID-19 cases, hospitalizations, and deaths [5] , [6] , [7] , [8] and [9] . Most such models use publicly available data and epidemic models to forecast hospitalizations down to the level of a single county or several adjacent counties. However, few tools are available for hospitals to make a probabilistic forecast of their expected share of the forecast regional volume. The data available to make such a forecast include: the outputs of the aforementioned models; detailed historical data on countylevel hospitalizations, available from the national authorities such as [10] ; real-time data on hospitalizations in a particular county or region available from local authorities such as and [11] ; and hospitalspecific hospitalization data to the managers of the institution generating the forecast.
This model was developed in response to a request from the COVID-19 planning leadership of a large academic medical center (AMC) in a large county in California during the summer of 2020. After the initial wave of COVID-19 cases was brought under control with non-pharmaceutical interventions such as social distancing, the hospital restarted non-urgent admissions for procedures such as surgery. As national news of a 'second wave' of COVID-19 hospitalizations spread, the AMC leadership wanted to prepare. They requested a forecast that would inform them, with as much notice as possible, of an influx of COVID-19 patients sufficiently large that elective admissions should be halted in order to make capacity available for the expected COVID-19 patients. We were provided with the hospital's historical data on the number of admissions and the length of stay of each patient in the ACU and ICU, historical and forecast data for the total number of hospitalizations in the county, and automated daily updates on the number of new COVID-19 admissions to the ICU and ACU as well as patients currently in those units. We worked with hospital leadership to estimate the capacity of COVID-19 patients that the institution could accommodate without having to increase available capacity by canceling scheduled procedures as. We also worked with the leadership to determine an order for cancelling scheduled, non-urgent surgical procedures if necessary. The order was based primarily on the clinical acuity of those requiring the procedure, the average ICU and ACU post-operative length of stay associated with the procedure, and additional constraints on hospital operations. Those efforts are described in another work in progress. The goal of the present work was to generate a forecast that used recent data on the share of all COVID-19 patients in the county to provide two weeks notice for when the demand associated with COVID-19 patients was likely to require the cancellation of the scheduled procedures. Since hospital occupancy fluctuates naturally, rather than determine a hard cut-off for cancelling procedures, hospital leadership requested that we notify them if the upper bound of the prediction interval exceeded a pre-specified lower bound at which point they would evaluate the prospect of cancelling cases.
We start by describing the problem setting from a mathematical perspective. We assume that we are currently in day 0 and have been tasked with producing prediction intervals for the future number of hospital-level ACUte care unit (ACU) and intensive care unit (ICU) hospitalization at the end of day r, with r ≥ 0. For the purpose of predicting these hospital-level prediction intervals, we have available historical data ((A j , B j , N j ) : −n ≤ j ≤ −1), where N j is the total number of regional hospitalizations at the end of day j, A j is the number of ACUte care hospitalizations at the given hospital at the conclusion of day j, and B j is the number of ICU hospitalizations at the given hospital at the end of day j. Furthermore, we assume that we have available a point forecast F r for the mean number of regional hospitalizations at the end of day r.
Throughout the paper, we take the view that the A j 's,B j 's and N j 's can be reasonably modeled as Poisson distributed random variables (rv's).We will use the notation P(λ) to denote a Poisson rv with mean λ. There is an extensive mathematical theory supporting the use of Poisson rv's in the setting of such count statistics; see, for example, [12] .
A simple model relates A j and B j to N j by assuming that EA j = p 0 EN j and EB j = q 0 EN j for p 0 , q 0 ≥ 0. Because the N j 's are subject to episodic epidemic growth spurts, we do not assume that EN j is constant. Instead, we permit λ j ≡ EN j to fluctuate in a potentially complex fashion.
In this section, we assume that point forecast F r is perfect, in the sense that
It follows that if we select l(λ) (the lower endpoint) as the largest integer such that P (P(λ) < l(λ)) ≤ δ 2 and u(λ) (the upper endpoint) as the smallest integer such that P (P
To obtain similar prediction intervals for A r and B r , we need to estimate p 0 and q 0 from the data. The obvious estimators for p 0 and q 0 are given bŷ
In fact,p andq are the maximum likelihood estimators (MLE's) for p 0 and q 0 when A j (and B j ) are, conditional on N −n , . . . , N −1 , independent in j and binomially distributed with parameters N j and p 0 (and q 0 ). This leads to the prediction intervals [l(pF r ), u(pF r )] for A r and [l(qF r ), u(qF r )] for B r . We refer to these prediction intervals as the plug-in prediction intervals based on perfect forecasts.
Our frequentist approach starts by setting θ = (p, q) and letting P θ (·) be the probability model under
Since p 0 is unknown, the plug-in interval [ (pF r ), u(pF r )] of section 2 is an obvious alternative. However, becausep is random, we can not guarantee that
where θ 0 = (p 0 , q 0 ). Instead, we seek a probabilistic guarantee, namely that (3.1) holds, with probability (or confidence level) 1 − α.
We can accomplish this by choosing the integer z so that
Hence, with confidence at least 1 − α, (pF r ) − z is an appropriately chosen value for the left endpoint of A r 's prediction interval. Similarly, if we choose the integer z r so that
as our prediction interval for A r that takes into account the estimation uncertainty that is present inp.
To compute z and z r from (3.2) and (3.3), we use the parametric bootstrap (see, for example, [13] ), thereby computing the values z * and z * r such that
whereθ = (p,q) andp * is the estimator forp obtained from a bootstrap sample of the data set; the details can be found in the algorithm as described below. This leads to the prediction interval [ (pF r )− z * , u(pF r ) − z * r ]; we refer to this as the bootstrap prediction interval for A r based on perfect forecasts. We can similarly compute the bootstrap prediction interval for B r based on perfect predictions.
Specifically, our bootstrap prediction intervals are produced by the following algorithm.
). 6. Compute the smallest integers z * A, and z * B, for which
and the largest integers z * A,r and z * B,r for which
are the bootstrap prediction intervals for A r and B r respectively, where [x] + ∆ = max(x, 0) for x ∈ R.
The model described in Section 2 and 3 assumes no forecast error. As a consequence, the distribution for N i is Poisson distributed with mean F i . However, the forecast F i itself is imperfect, and there typically is additional uncertainty in the prediction of N i (beyond the stochastic variability of a Poisson rv) that should be reflected in the prediction interval. In this section, we model the forecast error by assuming that
where N i is (again) Poisson with mean λ i , and the relative forecast error Γ −1 i is assumed to be lognormally distributed. Furthermore, we assume that the N i 's are independent of the Γ −1 i 's, and that the forecasts are relatively unbiased, in the sense that
for all i, thereby implying that E[Γ i ] = 1.
Of course, one expects that if the forecast underpredicts N i at time i, F i+1 is also likely to underpredict N i+1 . This suggests that the Γ i 's should be modeled as a correlated sequence. In particular, we will assume that if Y i = log Γ i , the Y i 's form a stationary sequence that evolves according to the recursion
where the Z i 's are independent and identically distributed (iid) normally distributed rv's with mean µ 0 and variance σ 2 0 . Note that the stationarity of the Y i 's implies that ρ ∈ (−1, 1), with Y i having a normal distribution having mean µ 0 (1 − ρ 0 ) −1 and variance σ 2 0 (1 − ρ 2 0 ) −1 ; see [14] . For this model, we need to estimate the parameters µ 0 , σ 2 0 and ρ 0 associated with the log-normally distributed forecast error sequence. As in Section 2 and 3, we assume that we have observed the time
, and we adopt the view that we wish to impose as few assumptions as possible on the λ i 's (given the episodic nature of the coronavirus epidemic). For this reason, we will use the method of moments to estimate µ 0 , σ 2 0 and ρ 0 .
Given (4.2), we require that
To obtain a second equation, note that
For the third equation, we observe that
This suggests that we estimate µ 0 , σ 2 0 and ρ 0 by minimizing the objective
followed by utilizing the minimizer (μ,σ 2 ,ρ) as our estimator of (µ 0 , σ 2 0 , ρ 0 ), and then estimatep and q as in (2.2). When n is large (and the statistical model describes the data well), we expect that the objective function will vanish at (μ,σ 2 ,ρ), in which case m i (μ,σ 2 ,ρ) =M i will be satisfied as equations for i = 2, 3. In the Appendix, we prove that our estimators for µ 0 , σ 2 0 , and ρ 0 are consistent, under very moderate assumptions on the λ i 's.
We note that in this model, the prediction interval for N r must reflect the additional randomness stemming from the fact that the mean of the Poisson random variable is itself random, namely it is given by F r Γ r . In particular, let P(µ, σ 2 , ρ, f ) be a rv that is conditionally Poisson distributed, with (random) mean f exp(N (µ/(1 − ρ), σ 2 /(1 − ρ 2 ))), where N (µ/(1 − ρ), σ 2 /(1 − ρ 2 )) is a normal rv with mean µ/(1 − ρ) and variance σ 2 /(1 − ρ 2 ). The plugin prediction interval for A r based on this model is the interval [ (μ,σ 2 ,ρ,pF r ), u(μ,σ 2 ,ρ,pF r ))], where (µ, σ 2 , ρ, f ) is the largest integer j such that P (P(µ, σ 2 , ρ, f ) < j) ≤ δ/2 and u(µ, σ 2 , ρ, f ) is the smallest integer k such that P (P(µ, σ 2 , ρ, f ) > k) ≤ δ/2. Similarly, [ (μ,σ 2 ,ρ,qF r ), u(μ,σ 2 ,ρ,qF r ))] is the plug-in prediction interval for B r .
The computation of (µ, σ 2 , ρ, f ) and u(µ, σ 2 , ρ, f ) can be implemented via Monte Carlo, using the following algorithm. We now turn to the construction of prediction intervals for A r and B r that reflect the additional uncertainty due to the need to estimate µ 0 , σ 2 0 , ρ 0 fro the observed data ((A i , B i , N i , F i ) : −n ≤ i ≤ −1). Again, we use the bootstrap to compute the corrections z * A, , z * B, , z * A,r , z * B,r that appear in this setting (that are direct analogs to those appearing in Algorithm 1 for perfect forecasts.)
1. Generate Y * −n as a normal rv with meanμ/(1−ρ) and varianceσ 2 /(1 −ρ 2 ).
where the Z * i 's are independently simulated as normal rv's with meanμ and varianceσ 2 . 3. Given (Y * i : −n ≤ i ≤ −1), simulate the N * i 's as independent Poisson rv's with means (F i exp(Y * i ) : −n ≤ i ≤ −1).
M * 2 = 1 n −1 i=−n N * 2 i − N * i F 2 i , M * 3 = 1 n − 1 −1 i=−n+1 N * i N * i−1 F i F i−1 .
* ,σ 2 * ,ρ * ) of M * 2 − m 2 (µ, σ 2 , ρ) 2 + M * 3 − m 3 (µ, σ 2 , ρ) 2 subject to m 1 (µ, σ 2 , ρ) = 1, −1 ≤ ρ ≤ 1, σ 2 ≥ 0. 6. Generate (A * i , B * i , N * i − A * i − B * i ) as multinomial rv's with parameters (N * i ,p,q, 1 −p −q), −n ≤ i ≤ −1. 7. Computê p * = −1 j=−n A * j −1 j=−n N * ĵ q * = −1 j=−n B * j −1 j=−n N * j 8. Use Algorithm 2 to compute (μ * ,σ 2 * ,ρ * ,p * F r ), u(μ * ,σ 2 * ,ρ * ,p * F r ), (μ * ,σ 2 * ,ρ * ,q * F r ), u(μ * ,σ 2 * ,ρ * ,q * F r ). 9. Repeat Steps 1 to 8 b times, thereby yielding b 4-tuples ( (μ * i ,σ 2 * i ,ρ * i ,p * i F r ), u(μ * i ,σ 2 * i ,ρ * i ,p * i F r ), (μ * i ,σ 2 * i ,ρ * i ,q * i F r ), u(μ * i ,σ 2 * i ,ρ * i ,q * i F r )).
A, and z * B, for which
,r ] are our bootstrap prediction intervals for A r and B r , respectively, based on unbiased log-normal forecasts.
We now modify the model of Section 4 to permit biased forecasts. The only change we make here is that we drop the requirement (4.2). In this case, we need to add an additional moment identity in order to uniquely identify the coefficients (µ 0 , σ 2 0 , ρ 0 ) underlying the forecast errors given by the Γ −1 i 's. Note that
This suggests that we should estimate (µ 0 , σ 2 0 , ρ 0 ) via the minimizer (μ,σ 2 ,ρ) of the objective function 
As in Section 4, we estimate p 0 and q 0 viap andq as in (2.2) . As in Section 4, [ (μ,σ 2 ,ρ,pF r ), u(μ,σ 2 , ρ,pF r )] and [ (μ,σ 2 ,ρ,qF r ), u(μ,σ 2 ,ρ,qF r )] are then our plug-in prediction intervals for N r based on the biased log-normal forecast error model. Similarly, incorporating the estimation error related to estimating (µ 0 , σ 2 0 , ρ 0 , p 0 , q 0 ) via (μ,σ 2 ,ρ, p,q) requires only small modifications to the methodology of Section 4. The modified version of Algorithm 3 reflecting use of biased forecasts is provided next.
Algorithm 4 is identical to Algorithm 3, excepting that (μ,σ 2 ,ρ) is now the minimizer of (5.1), and Steps 4 and 5 are modified as follows:
5 . Compute the minimizer (μ * ,σ 2 * ,ρ * ) of
Algorithm 4 yields our desired bootstrap prediction intervals for A r and B r , just as Algorithm 3 yields such intervals for the unbiased model of Section 4.
We use historical county-level COVID-19 hospitalization forecasts and ACU, ICU COVID-19 hospitalizations from the AMC studied. Given the small number of patients, we protect patient privacy by Figure 1 .
We compare the prediction intervals under the three settings we discuss above (perfect, unbiased, biased), with plug-in prediction intervals and bootstrap prediction intervals under each setting. We choose δ = 0.05 (corresponding to 95% prediction intervals) for both plug-in and bootstrap, and α = 0.05 (corresponding to confidence level of 95%) for bootstrap.
To compare the prediction performance of each proposed model with real data, we choose r = 7 (on each Monday we make ACU, ICU predictions for the next Monday), comparing with the actual value. Also we set n increased by 1 for each additional observed day in each model. We set algorithm parameters b 0 = 1000, m = 300, δ = 0.05, α = 0.05. With these parameters, the perfect model, unbiased model and biased model proposed converged in 1.25, 4.08 and 4.25 seconds, respectively, when run on a laptop.
Projections for ACU and ICU made by different models are shown in Figure 2 and 3 . In each plot, dash lines indicate 95% bootstrap prediction intervals, solid lines indicate 95% plug-in prediction intervals and black dots indicate actual values. The unbiased models tend to provide wider prediction intervals. As we get larger n, the bootstrap prediction intervals are getting closer to the plugin prediction intervals.
As shown in Table 1 , with r = 7, the fractions of weeks for which each 95% plug-in prediction intervals covered the observed bed count in the ACU is 70% for all three models. The 95% bootstrap prediction intervals covered 90% of the observed bed count in the ACU for all models. All of the prediction intervals covered 100% of the observed bed count in the ICU. Bootstrap intervals are generally wider, thus the coverage rates are higher. The results with 90% prediction intervals (Figure 8, Figure 9 , Table 3 ) and 80% prediction intervals ( Figure 10, Figure 11 , Table 4) on AMC data can be found in the Appendix.
The demand intervals forecast using the perfect model were communicated to the hospital manager in charge of COVID-19 response capacity planning. The upper bound of the prediction intervals remained below the threshold hospital leadership felt comfortable could be accommodated without the cancellation of elective admissions. In this section, we generate synthetic data for 100 days. The λ's are generated using SIR model (see, for example, [15] and [16] ), and the forecasts are generated following different model assumptions. We generate N i from the Poisson distribution with mean λ i . A i 's and B i 's are generated from the multinomial distribution with parameters (N i , p, q, 1−p−q). They are all generated once and used in all following sections.
To evaluate the performances, we apply the above prediction methods on the last 60 observations.
The synthetic data are shown in Figure 4 .
Here we generate
satisfying the "perfect forecast" assumption. The 95% prediction intervals for ACU({A i }), ICU({B i }) are shown in Figure 5 . The fractions of observations for which 95% plug-in prediction intervals covered the observed bed count are 97%, 90% for ACU, ICU respectively; the ones for 95% bootstrap prediction intervals are 98%, 93%.
Under this setting, we set ρ = 0.5, σ 2 = 0.01, µ = − σ 2 2(1+ρ) and generate
where ∼ represents "distributed according to", so that E(Γ i ) = 1 which satisfies the assumptions in the "unbiased forecasts model". The 95% prediction intervals for ACU({A i }), ICU({B i }) are shown in Figure 6 . The fractions of observations for which 95% plug-in prediction intervals covered the observed bed count are 100%, 98% for ACU, ICU respectively; the ones for 95% bootstrap prediction intervals are 100%, 100%. Since unbiased model tend to generate wider prediction intervals, the coverage rates are higher.
Under this setting, we set ρ = 0.5, σ 2 = 0.01, µ = 0. The generation method is the same as that in unbiased model setting. The 95% prediction intervals for ACU({A i }), ICU({B i }) are shown in Figure 7 .
The fractions of observations for which plug-in prediction intervals covered the observed bed count are 97%, 97% for ACU, ICU respectively; the ones for bootstrap prediction intervals are 100%, 98%.
All the plots show that with n increasing, the bootstrap prediction intervals are getting closer to the plugin intervals. Unbiased and biased models larger variances, resulting in wider prediction intervals. The coverage rates of prediction intervals are shown in Table 2 . The results with 90% prediction intervals ( Figure 12 , Figure 13 , Figure 14 , Table 5 ) and 80% prediction intervals ( Figure 15 , Figure 16 , Figure 17 , Table 6 ) on synthetic data can be found in the Appendix.
In this work we introduce, DICE (Demand Intervals from Consistent Estimators), a model to forecast prediction intervals for the fraction of regional patient demand arriving to an institution based on the historical fraction of demand served by the institution and, potentially biased, forecasts of demand as a Poisson random variable. We show that our model is consistent, computationally tractable, and well-calibrated on empirical data as well as synthetic data. Unlike Hidden Markov models that may fail to Table 2 : Coverage rate of 95% prediction intervals, synthetic data converge or be prohibitively computationally expensive due to the curse of dimensionality, all of the models tested converged in seconds. To illustrate its potential usefulness, we discuss the managerial COVID-19 decisions that prompted the development of the models as well as how they were used to inform these decisions at an academic medical center. The demand interval forecasts suggested that the 'second wave' influx of COVID-19 patients would be unlikely to exceed available hospital capacity. The information provided by the model contributed to, the ultimately correct, decision that COVID-19 patients could be accommodated without the cancellation of elective admissions. As hospitals the world over prepare for a third wave of COVID-19, this model may find similar applications at institutions planning their response to an influx of patients. Beyond COVID-19, patient demand for a variety of medical conditions is forecast as a Poisson random variable. The model developed may be of use to the numerous decision to make which hospital managers project demand for their services by combining their historical share of regional demand with forecasts of total regional demand. 
We establish here that the "method of moments" estimators of Sections 4 and 5 will be consistent in great generality. This will follow if we can prove that
as n → ∞, for 1 ≤ i ≤ 3, where p − → denotes "converge in probability".
Note that EM i = m i (µ 0 , σ 2 0 , ρ 0 ) for 1 ≤ i ≤ 3. Hence, (A.1) follows from Chebyshev's inequality if we can show that
Also, for i < j
where O(a i ) denotes a quantity that is bounded by a multiple of |a i |. Similar calculation can be found in, for example, [17] . Consequently,
as n → ∞ if we assume that the infimum of the λ i 's is bounded away from zero. Similarly, VarM i → 0 for i = 2 and i = 3 under this very moderate hypothesis on the λ i 's, thereby establishing the consistency. 