summarise_model {idmodelr} | R Documentation |
Summarise a Model Simulation
Description
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.
Usage
summarise_model(sim)
Arguments
sim |
A tibble of model output as produced by
|
Value
A tibble of summary information for a model simulation.
Examples
## 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)
[Package idmodelr version 0.4.0 Index]