Infectious disease modelling with Bass SIR models
In R, you can install from github
devtools::install_github("COVID-19-Modelling/BassSIR", upgrade = FALSE)
Load the package before use it
library(BassSIR)
cases <- as_bass_data(n_covid19$Hubei, id = "Hubei")
est <- BassSIR::fit(cases, r_rec = 1/22.2, r_death = 1/22.3, type = "BassSIR")
sim <- simulate(est, nsim = 1000)
Fit BassSIR model to data
est_bass <- BassSIR::fit(cases, r_rec = 1/22.2, r_death = 1/22.3, type = "BassSIR")
summary(est_bass)
Fit SIR model to data
est_sir <- BassSIR::fit(cases, r_rec = 1/22.2, r_death = 1/22.3, type = "SIR")
summary(est_sir)
compare_models(BassSIR = est_bass, SIR = est_sir)
sim <- simulate(est_bass, nsim = 1000)
zero_kappa <- function(pars) {
pars$kappa <- rep(0, length(pars$kappa))
return(pars)
}
lockdown <- run_scenario(sim, zero_kappa)
compare_scenarios will output two group of time-series
cp <- compare_scenarios(sim, Lockdown = lockdown, fn_change = "Yt")
TBA
Chu-Chang Ku,
Health Economic and Decision Science, University of Sheffield, UK
Email: c.ku@sheffield.ac.uk
MIT (c) 2020 Chu-Chang Ku, Ta-Chou Ng, and Hsien-Ho Lin
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.