Quickstart for SIRD Modeling of the COVID-19 Outbreak
Authors: Poles Jordan 
Published: September 2020

Overview: There are a number of different methodologies that one can employ in order to model the outbreak of an infectious disease, in this case the novel 2019 coronavirus (COVID-19). Some, like generalized logistic models or Richards models rely on the expectation of a logistic pattern of growth in cumulative cases and clasically do not incorporate such complex dynamics as isolation of infected individuals, shelter-in-place orders for the general population (as instituted in New York City), or other change in public health policy over time. Here we present an implementation of a Susceptible-Infected-Recovered-Deceased (SIRD) model, with parameter fitting to real-world data, which can assist in projecting the overall trajectory of an outbreak in response to such complex changes in the environment. Our methodology is contained in a freely available IPython notebook, with the goal of providing a good starting point for other citizen scientists interested in exploring and forecasting the COVID-19 outbreak.
Methodology: While a great deal can be learned from the simpler style of models mentioned above, the SIRD model allows for a great deal of nuance in forecasting because it attempts to approximate real-world dynamics, namely the flux of individuals between compartments in the outbreak; for example, susceptible people become infected at a specific rate, and those infected people then recover or die at specific rates. Our implementation of this model utilizes a system of ordinary differential equations (ODEs) inspired by the work of Diego Caccavo [1]. Typically we model the rate of infection as a constant β multiplied by the overall proportion of infected people and by the # of susceptible people. In our methodology, we have instead modeled this β value as a function of time β(t). In this way, we can account for changes in infection rate, for example a decrease due to a lockdown at timepoint t_lockdown (with shelter-in-place, for example) or an increase due to the lifting of such a lockdown at timepoint t_lift (Fig C). After establishing the equations which will dictate the dynamics of the model, we fit the parameters (β, 𝜏_𝛽, 𝛾, 𝛿) using non-linear least-squares regression via a function provided by the SciPy package.
Results: We demonstrate a functional IPython Notebook which allows for fitting of SIRD model parameters to real-world datasets. Additionally, we can form rudimentary projections of potential outbreak trajectories in response to real-world changes in the environment in which an outbreak is occuring by modifying the system of ODEs. For example, we show the effect of changing the date on which shelter-in-place measures are lifted on a simulated New York City (NYC). We first fit the parameters of the SIRD model (Fig C) using real-world outbreak data from NYC provided by the NY Times. We then run the model, demonstrating that lifting shelter-in-place public health measures after only a month causes a rebound and second peak in cases in the simulated New York City (Fig A). On the other hand, lifting the shelter-in-place orders after two months allows the outbreak in the simulated city to die down without a second spike in cases (Fig B).

Conclusions: Overall, we believe that there is a great deal of predictive and explanatory power provided by SIRD-type models. We hope that other researchers in the field can use our work as a basis for further customization and tailoring of the system of ODEs, allowing these models to be fit to a variety of different cities, states, or other regions. That said, we also want to urge caution to those hoping to utilize these models to exactly predict the course of an outbreak or develop specific timing of public policies. These models are simply projections, and are highly limited by the overall limited availability and quality of data at this point in the COVID-19 outbreak.