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)

Arguments

sim

A tibble of model output as produced by solve_ode.

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)
#> # A tibble: 1 × 5
#>   `Final size: S` `Final size: I` `Epidemic peak time` `Epidemic peak` Epidemi…¹
#>             <dbl>           <dbl>                <dbl>           <dbl>     <dbl>
#> 1               0          100000                   39          100000       Inf
#> # … with abbreviated variable name ¹​`Epidemic duration`