Various difficulties were encountered with installing Xcode and Fortran compilers for Mac and R-tools for Windows. However, with persistence and some problem-solving on Piazza, these were all resolved.
The following code is adapted from the notes for Simulation-Based Inference for Epidemiological Dynamics [1].
In the simulated outbreaks, the overall incidence is much too low, and the outbreak dies out after only a few weeks. To attempt to simulate data for which the observed data is a more plausible realization, we might try increasing the force of infection.
Taking it farther….
While this increases the overall incidence, the epidemic is now peaking too quickly. To counteract this, we might try reducing the recovery rate
Additionally, we might have a look at the effects of changing the initial susceptible fraction, η. It’s possible to get something not too awful to contemplate by just manipulating \(\eta\), in fact:
The existing code may be modified as follows:
Using the rough estimate that the latent period in measles is \(8-10\) days, we take \(\mu_{EI} \sim 0.8 wk^{-1}\) and \(\mu_{IR} \sim 1.3 wk^{-1}\) (so as to have roughly the same generation time as before).
Again one can increase the force of infection:
Now increase \(\beta\) to, by trial and error, 37.
Notice that it seems that the simulated time series peak too late. We can decrease \(\eta\) back to 0.03, and increase \(\beta\) to 73.
Despite some uncertainties, this seems like a reasonable model for the time series. So we can choose \(\beta=73, \mu_{EI}=0.6,\mu_{IR}=1, \rho=0.7, \eta=0.03\) for the SEIR model.
1. King, A.A., Ionides, E.L., and Lin, Q. (2021). Simulation-based inference for epidemiological dynamics. Summer Institute in Statistics and Modeling in Infectious Diseases. Available at: https://kingaa.github.io/sbied/.