knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(dplyr) devtools::load_all()
The goal of covidReff is to simulate Covid outbreaks in a partially vaccinated
population.
The development version from GitHub with:
# install.packages("remotes") remotes::install_github("grattan/covidReff")
The simulate_covid() runs simulations of Covid spreading and returns a tibble with the results for each simulation (runid) on each day. Using the default settings:
sim_results <- simulate_covid()
The resulting tibble is:
glimpse(sim_results)
The key inputs of the simulate_covid() function -- among many -- are the reproduction value of the virus in a 'relaxed' Australian society, R, and the proportion of the whole population that are vaccinated, vaccination_levels.
sim_r8_50 <- simulate_covid(R = 8, vaccination_levels = .5)
The vaccination_levels is provided as either a single numeric for vaccination levels uniformly-distributed across age groups (as above), or you can provide a numeric vector of length 10 describing the vaccination rates for age groups 1-10, 11-20, 21-30, ..., 91-100.
sim_r4_50 <- simulate_covid( R = 4, vaccination_levels = c( "0-10" = 0.00, "11-20" = 0.40, "21-30" = 0.60, "31-40" = 0.60, "41-50" = 0.60, "51-60" = 0.70, "61-70" = 0.90, "71-80" = 0.90, "81-90" = 0.95, "91+" = 0.95) ) glimpse(sim_r4_50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.