Consider the closed compartmental model described by the following equations, with days as the time unit of the model, and where \(\beta,\,\gamma\) and \(\sigma\) have the same meanings as in lectures:
\[\begin{align*} \frac{dS}{dt} & = -\frac{\beta IS}{N}\\ \frac{dE}{dt} &= \frac{\beta IS}{N} - \sigma E\\ \frac{dI}{dt} &= \sigma E - \gamma I\\ \frac{dR}{dt} &= \alpha \gamma I\\ \frac{dD}{dt} &= \lambda\gamma I. \end{align*}\]
The .Rdata file ‘assignment1_df.Rdata’ (which you can find under ‘Datasets’ in the ‘resources’ section on Ultra) loads a data frame named assignment1_df
, which contains synthesized cumulative daily death counts for some infectious disease over 40 days. The disease spread through a population of 1080 people, all of whom were susceptible apart from the initial infectious person. You can assume that the pre-infectious period of this disease is negligible, and that once recovered, survivors have perfect immunity.
Please submit your R code (you may have to screenshot it or convert it to a form that is uploadable to Gradescope) along with your answers. You may adapt the code in the R files used in workshops 1 and 2.