sim_monomolecular.Rd
Simulate a stochastic epidemic curve using the Monomolecular model.
sim_monomolecular(N = 10,dt = 1, y0 = 0.01, r,K = 1, n, alpha = 0.2)
N | Total time course of the epidemic |
---|---|
dt | Time step |
y0 | Initial inoculum or initial disease intensity |
r | Infection rate |
K | Maximum asymptote |
n | Number or replicates or sample size for each time step |
alpha | Variation parameter. stands for the variation for the replicates for each time step. The standard deviation is calculated as sd = alpha * y * (1 - y), being y the disease intensity for each time step. |
Replicates
Time after epidemic start
Disease intensity
Disease intensity after applying the random alpha
error
sim_monomolecular(N = 30, y0 = 0.01,dt = 5, r = 0.3, K = 1, alpha = 0.5, n = 4)#> replicates time y random_y #> 1 1 0 0.0100000 0.01000000 #> 2 1 5 0.7791000 0.88034687 #> 3 1 10 0.9507122 0.91170310 #> 4 1 15 0.9890023 0.98648142 #> 5 1 20 0.9975461 0.99618030 #> 6 1 25 0.9994522 0.99924662 #> 7 1 30 0.9998774 0.99900000 #> 8 2 0 0.0100000 0.01008611 #> 9 2 5 0.7791000 0.66841179 #> 10 2 10 0.9507122 0.91227400 #> 11 2 15 0.9890023 0.99145057 #> 12 2 20 0.9975461 0.99752339 #> 13 2 25 0.9994522 0.99936510 #> 14 2 30 0.9998774 0.99982037 #> 15 3 0 0.0100000 0.01000000 #> 16 3 5 0.7791000 0.68657799 #> 17 3 10 0.9507122 0.97414212 #> 18 3 15 0.9890023 0.98562358 #> 19 3 20 0.9975461 0.99585166 #> 20 3 25 0.9994522 0.99996392 #> 21 3 30 0.9998774 0.99990342 #> 22 4 0 0.0100000 0.01000000 #> 23 4 5 0.7791000 0.87018416 #> 24 4 10 0.9507122 0.97148041 #> 25 4 15 0.9890023 0.98563459 #> 26 4 20 0.9975461 0.99900000 #> 27 4 25 0.9994522 0.99938235 #> 28 4 30 0.9998774 0.99979001