View source: R/summarise_model.R
summarise_model | R Documentation |
Provides simple summary statistics for a model produced using
solve_ode
. These include the final population
sizes, the time and size of the maximum epidemic peak, and the duration of
the epidemic.
summarise_model(sim)
sim |
A tibble of model output as produced by
|
A tibble of summary information for a model simulation.
## Intialise N = 100000 I_0 = 1 S_0 = N - I_0 R_0 = 1.1 beta = R_0 ##Time for model to run over tbegin = 0 tend = 50 times <- seq(tbegin, tend, 1) ##Vectorise input parameters <- as.matrix(c(beta = beta)) inits <- as.matrix(c(S = S_0, I = I_0)) sim <- solve_ode(model = SI_ode, inits, parameters, times, as.data.frame = TRUE) summarise_model(sim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.