Forecasting Coronavirus Case Counts in NYC

COVID-19 cases are sweeping the globe. One potential hotspot seems to be New York City. Here I show the historical case count and present a simple forecast.

I’m not a professional epidemiologist nor forecaster, I merely present a simple forecast for the coming week based on past observations.

Here we have the actual data gathered from the historical timemap of New York City’s Department of Health and Mental Health’s Coronavirus Disease 2019 (COVID-19) page as seen at archive.org and github.com.1 The particular data in question are the total positive cases of COVID-19 recorded in New York City since February 10. As you can see, the first positive case was recorded on March 1 and the case count exploded around March 15.

Above, I try a Box-Cox- and log-tranformation to see which makes the trend look straightforward. Both are fair, but it looks as if a log-transformation makes the trend very simple, so we’ll use that for our forecast [Edit: original forecast relied on data through March 20]. The most recent date for the first (unpublished) forecast I did when I was watching the NYC webpage was March 17.

As you can see, surprisingly, March 18-21 are at the top of the 80% confidence band, but March 22-24 are breaking with the trend!2 Next, the first time I published a forecast was using March 20 as the last data point, so let’s see how the published forecast is doing.

So far, right on target (with good news that the data is moving toward the bottom of the forecast here too!)—we’ll update as new information is available. Let’s now try to forecast based on the most recent data, April 05, for dates up to April 12.

This brings the estimated positive case count for the April 12 data to t(N(12, 1.7))! As this strikes me as too high—plus, we know that we don’t have an infinite population for exponential growth to go forever, I’ll also try a forecast from the Box-Cox transformation shown above.

This brings the estimated positive case count for the April 12 data to t(N(109, 100)). Stay healthy, NYC!


  1. More data is here, https://www1.nyc.gov/site/doh/covid/covid-19-data.page.

  2. This Exponential smoothing state space model is a ETS(A,A,N): Holt’s linear method with additive errors, https://robjhyndman.com/talks/RevolutionR/6-ETS.pdf; https://fable.tidyverts.org/reference/index.html

Edit this page

Avatar
Joseph de la Torre Dwyer
Researcher

My research interests include distributive justice; the principles of responsibility, desert, and control; and reproducible research with R.

Related