Description Usage Arguments Details Value
Simulate from a Markovian SIR epidemic model.
1 2 |
beta |
The infection parameter |
gamma |
Recovery rate |
S0 |
Initial number susceptible |
I0 |
Initial number infectious |
R0 |
Initial number recovered |
t0 |
Initial time |
norm_beta |
Whether beta should be normalised (i.e. divided) by population size |
t_end |
Time at which the simulation will terminate |
step_end |
Number of steps after which the simulation will terminate |
thinning |
An integer determining what type of
output to return. Zero gives the final state. A positive
value thins the output by this factor i.e.
|
This function performs a simulation. This terminates when (a) the specified time is reached or (b) the specified number of steps have been performed or (c) zero infectious remain. A simulation terminated for (a) or (b) can be continued by starting another simulation from the final state.
A dataframe with columns step (number of steps performed), S, I, R (state at this step) and elapsed (computer time taken). The steps reported depend on the thinning variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.