R arm of morie.fn.sirepi: Kermack-McKendrick SIR, \(dS/dt =
-\beta SI/N\), \(dI/dt = \beta SI/N - \gamma I\), \(dR/dt = \gamma I\),
integrated by classical RK4 with step dt (last step shortened to
land on T); basic reproduction number, peak and the asymptotic
final size solving \(S_\infty = S_0 \exp(-(\beta/(\gamma N))(N -
S_\infty - R_0))\).
Usage
Sirepi(S0, I0, R0, beta, gamma, T, dt = 0.1)
Arguments
- S0, I0, R0
Initial counts.
- beta
Transmission rate.
- gamma
Removal rate.
- T
Horizon.
- dt
Step.
Value
List with t, S, I, R,
R0_basic, peak_I, peak_time, final_S,
attack_rate.
References
Kermack, W. O. and McKendrick, A. G. (1927). A contribution to
the mathematical theory of epidemics. Proceedings of the Royal Society A
115, 700-721.
Examples
Sirepi(990, 10, 0, 0.3, 0.1, 50, dt = 0.5)$final_S
#> [1] 58.79736