sim_epi_data | R Documentation |
Simulate epidemiological data
sim_epi_data(S0, I0, max_time, beta_vec, xi_0, user_seed = 1234L)
S0 |
number of individuals in the population. |
I0 |
number of infected individuals at time 0. |
max_time |
maximum observed time. |
beta_vec |
vector with the infection rate for each discrete time. |
xi_0 |
the recovery rate of the population, must be in |
user_seed |
seed for random distribution generation. |
Function sim_epi_data
returns a vector with the simulated infection times.
betas <- c(rep(0.45, 25),rep(0.14,25))
inf_times <- as.numeric()
inf_times <- sim_epi_data(10000, 10, 50, betas, 1/8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.