Context

This post documents a small project I worked on from January through April 2024 with Keren Tapper, Ross Walker, and Toyo Sadare, on behalf of Public Health Scotland. Our brief was to forecast the number of patients likely to turn up at Accident & Emergency centres across Scotland, using just the data that the Scottish government make publicly available. The largest hurdle we encountered was the extreme variation in the number of people served by a given hospital in Scotland. This means noise, or week-to-week variation in the number of patients who attend A&E is much more significant in, say, Orkney than Glasgow. Ultimately, this was a fun opportunity to cook-up different approaches to modelling this particular time-series, that were not wholly unsuccesful, though I now realise there are more standard ways to tackle this kind of problem.

Download PDF

I have reproduced figure 7 from the report here which shows some results from the model I worked on most closely.

Predictions of the Fourier series model for a large, medium, and small HBT in the form of a) Greater Glasgow and Clyde, b) Highland, and c) Orkney respectively. All three cases represent a prediction for 2023 starting from data for 2022, with four modes included in the model. The blue dots indicate ground truth values for 2023, and are joined to aid the eye; the green dashed line is the model prediction, and the green shaded region is a 95% confidence interval.