# forecasting without data

I have recently started working on bed forecasting project. I don't have data and I am asked to figure out a way to forecast the bed occupancy. As per the discussion with my supervisor/boss, I have to use probability to find out how many beds the hospital needs to start.

I would appreciate some opinions on how to get started with this problem without having access to the data. As my supervisor said that it is not about the trend in the data, which is increasing of course, it is about the probability.

I was about fitting probability distribution such as Binomial or Poisson.

#### Use the queue function in the utilities package

This type of problem can be dealt with as a queueing problem, which is a class of problem dealt with in statistical theory. For the case where you have the inputs for the use of the facilities by a set of users you can use a deterministic function to turn this into a set of queuing metrics. Typically, for each user you would have an input for the time they arrive, the amount of time they need to use the facilities, and a description of their waiting behaviour (i.e,. how long they are willing to wait for the facility before giving up and leaving).

Assuming you have all this information, you can use the queue function in the utilities package in R to compute the queueing metrics under various numbers of beds in your facility (see O'Neill 2021 for further explanation). Below I show an example of this function showing queueing results from using n = 3 facilities for a set of twenty users with random arrival-times and use-times. By varying the parameter n you can see the queueing results using different numbers of amenities. As you can see, the function allows inputs for a range of aspects of the problem, including revival-times and close-times for the facilities.

#Set parameters for queuing model
lambda <- 1.5
mu     <- 6
alpha  <- 5
beta   <- 2

#Generate arrival-times, use-times and patience-times
set.seed(1)
K <- 20
ARRIVE   <- cumsum(rexp(K, rate = 1/lambda))
USE.FULL <- 2*mu*runif(K)
WAIT.MAX <- function(kappa) { alpha*exp(-kappa/beta) }

#Compute and print queuing information with n = 3
library(utilities)
QUEUE <- queue(arrive = ARRIVE, use.full = USE.FULL,
wait.max = WAIT.MAX, n = 3, revive = 2,
close.arrive = 30, close.full = 35)

#View the queue results
plot(QUEUE)
QUEUE


This code produces the following queueing output showing information for each of the users and facilities in the queueing problem. The =plot shows this same information graphically, which gives a clear visualisation of the waiting-times, use-times, etc.

    Queue Information

Model of an amenity with 3 service facilities with revival-time 2
Service facilities close to new arrivals at closure-time = 30
Service facilities close to new services at closure-time = 35
Service facilities end existing services at closure-time = 35

Users are allocated to facilities on a 'first-come first-served' basis

----------------------------------------------------------------------

User information

arrive     wait      use     leave  unserved  F
user[1]   1.132773 0.000000 1.295324  2.428096 0.0000000  1
user[2]   2.905237 0.000000 8.684531 11.589768 0.0000000  2
user[3]   3.123797 0.000000 4.935293  8.059090 0.0000000  3
user[4]   3.333490 1.094606 9.851356 14.279452 0.0000000  1
user[5]   3.987593 3.032653 0.000000  3.987593 7.7647223 NA
user[6]   8.330046 1.729045 9.395193 19.454283 0.0000000  3
user[7]  10.174389 3.032653 0.000000 10.174389 6.6364357 NA
user[8]  10.983913 1.839397 0.000000 10.983913 6.3566350 NA
user[9]  12.418764 1.171004 9.472275 23.062043 0.0000000  2
user[10] 12.639333 3.032653 0.000000 12.639333 0.2799744 NA
user[11] 14.725436 1.554016 5.726761 22.006213 0.0000000  1
user[12] 15.868481 3.032653 0.000000 15.868481 8.7877649 NA
user[13] 17.724886 3.032653 0.000000 17.724886 8.3127787 NA
user[14] 24.360787 0.000000 5.731435 30.092223 0.0000000  1
user[15] 25.942602 0.000000 9.057398 35.000000 1.2771158  2
user[16] 27.495468 0.000000 5.257165 32.752633 0.0000000  3
user[17] 30.309521 0.000000 0.000000 30.309521 2.9375673 NA
user[18] 31.291641 0.000000 0.000000 31.291641 0.8481486 NA
user[19] 31.797041 0.000000 0.000000 31.797041 1.1935939 NA
user[20] 32.679761 0.000000 0.000000 32.679761 3.7952605 NA

----------------------------------------------------------------------

Facility information

open end.service      use revive
F[1]    0    30.09222 22.60488      8
F[2]    0    35.00000 27.21420      6
F[3]    0    32.75263 19.58765      6

• Thanks a lot Ben! Your response to my query was really helpful; I am going to set up a simple model and build it up from there.
Commented Mar 2, 2023 at 4:09

First off, I would not put ARIMA at the top of my list. On the one hand, as you write, you need data to fit an ARIMA model. On the other hand, ARIMA allows for non-integer and negative values, which does not make a lot of sense in your situation, but this is usually not a major problem. On the third hand, I see little reason for bed occupancy to exhibit autoregressive or moving average behavior, so an automatic ARIMA model selection algorithm is likely to get hung up on noise.

(Then again, if your hospital is overworked, then people may not get good enough care, so high occupancy today may be associated with high occupancy tomorrow. Or conversely, if your beds are full, your staff may have an incentive to "encourage" patients to be discharged, so high occupancy today may be associated with low occupancy tomorrow. You could take a look once you have data, but I would not expect the signal to be strong. ARIMA is not very good at forecasting, see here and here.)

Instead, I would simply simulate. Ask your domain experts about how many new stroke patients they expect each day, and what variability this figure might have. Also, ask the same question about how long any given new patient might stay. You will probably need to translate your experts' opinions into some sort of probability distributions, like Poissons or Negbins.

You might already have data on at least some of these pieces of information; I find it hard to believe a hospital does not have records about past patients, their indications and their length of stay. If so, you can draw from these empirical distributions.

Then simulate: draw a random number of new patients coming in today, and for each patient, draw how long they will stay. Fill your virtual beds, tracking how long each bed occupant still has to stay. Increment the date, discharge some patients, take new ones in, rinse and repeat. Do this over 100 days, multiple times, plot time courses or calculate summary statistics like averages and quantiles. This should not be hard in any programming environment, like Python or R.

The advantage is that you can immediately perform a sensitivity analysis, e.g., on what happens if the length of stay has more or less variability than your experts expected.

• ARIMA wasn't high on my list either! Poisson or negative binomial seem like good choices for priors here (+1). There are waitlists associated with beds, so a queuing model with an arrival process makes sense to me. Your second-to-last paragraph seems to be heading in that direction. Commented Feb 28, 2023 at 14:09
• +1. I performed this simulation (for assisted living facilities serving a rural region of several hundred thousand people) some 20 years ago with great success. It helped reveal complex relationships among the rates at which people would seek services and the varied occupancy rates for those limited services. Such relationships would be difficult to establish even by analyzing very complex models.
– whuber
Commented Feb 28, 2023 at 14:52
• @Galen: good point. We have a couple of questions on forecasting with reservations, typically in the context of restaurant or hotel bookings, something like this may make sense for forecasting hospital beds for elective or planned procedures. For strokes as in the OP's example, probably not so, few people reserve a bed for their stroke in advance... Commented Feb 28, 2023 at 17:24
• @StephanKolassa Good catch. I overlooked the reason for admission. Commented Feb 28, 2023 at 18:55