Description Usage Arguments Value Examples
A basic Euler scheme is used to numerically solve the ODE system of the standard SIR model.
1 2 3 4 5 6 7 8 9 10 11 |
beta |
the mean rate of contact, 1/beta the mean time between contact for a given individual (homogeneous population and mixing) |
gamma |
the mean rate of recovery, 1/gamma the mean time until recovery. |
s0 |
the initial susceptible population |
i0 |
the initial infected population |
r0 |
the initial recovering population, defaults to zer0 |
t0 |
initial time point |
tn |
the terminal time point |
n |
number of sub-intervals in time-grid |
verbose |
whether to plot the populations over time and print parameter+reproductive ratio |
list
parameters, a data.frame containing the contact rate, recovery rate, and r0 the basic reproduction ratio.
sir, a matrix of the three populations in columns over time, susceptible, infected, recovered
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.