simulate_covid: Simulate COVID

Description Arguments Value

View source: R/simulate-covid.R

Description

Simulate covid for a given reproduction number, level of vaccinations in a population, and other epidemiological params.

Arguments

R

The average number of additional people an infected person will infect in an unvaccinated society. It incorporates both the R0 of the variant and behaviours and policies may reduce alter transmission. A single numeric with default 4.5 to represent the Delta variant in a low-restriction society. See Kucharski et al (2021).

R_dist

The distribution of the R value, each with mean equal to R. One of: "constant" (the default); "rpois" (rpois(n, R)) ; "lnorm" (rlnorm(n, .05, .3)); or "beta" (rbeta(n, 0.25, 3)).

serial_interval

The average number of days between a person becoming infected and infecting others. A single numeric with default of 5, appropriate for wild type/Delta variant: Pung et al (2021)). A shorter serial_interval will speed up the virus spread over time.

vaccination_levels

Starting vaccination levels. Either a single numeric for a uniformly distributed population wide vaccination rate, or a named vector of length 10 representing the vaccination levels for age groups 0-10, 11-20, 21-30, ..., 91-100. Default is vaccination_levels = c(0, 0, 0, 0.5, 0.6, 0.9, 0.9, 0.9, 0.9, 0.9)

vaccination_growth_steepness

Defines how quickly additional people are vaccinated after opening, defaulting to 0.01. This is the growth parameter (c) in the logistic curve M / (1 + ((M - n0) / n0) * exp(-c*t)), where n0 is the starting vaccination level defined by vaccination_levels.

p_max_vaccinated

Maximum proportion of the population able to be vaccinated. A single numeric with default 0.90. This is the maximium level parameter (M) in the logistic curve M / (1 + ((M - n0) / n0) * exp(-c*t)), where n0 is the starting vaccination level defined by vaccination_levels.

only_pfizer_after_opening

When the simulation starts, do newly vaccinated people only get TRUE the Pfizer vaccine (the defult), or a mix of

over60_az_share

The proportion of vaccinated people over 60 years old who have the AstraZeneca vaccine. Single numeric defaulting to 0.80. Used for vaccine distribution before the simulation starts and, when only_pfizer_after_opening = FALSE, for new vaccines during the simulation.

under60_az_share

The proportion of vaccinated people 60-years-old and younger who have the AstraZeneca vaccine. Single numeric defaulting to 0.10. Used for vaccine distribution before the simulation starts and, when only_pfizer_after_opening = FALSE, for new vaccines during the simulation.

kids_R_reduction

The proportion reduction in transmission of children under the age of 18 defaulting to 0.3.

vac_transmission_reduction

The reduction in the likelihood of transmission from an infected vaccinated person relative to an infected unvaccinated person. A single numeric with default 0.5, representing a 50 per cent reduction in transmission from vaccinated infection people.

death_rate

The likelihood that an infected unvaccinated person dies by age. Either a character "loglinear", the default, which uses the log-linear relationship between age and mortality of 10^(-3.27 + 0.0524 * age) / 100 described in Levin et al (2021) and capped at 0.28. Alternatively, the user can provide a numeric vector of length 10 describing the death rates for age groups 0-10, 11-20, 21-30, ..., 91-100.

treatment_death_reduction

The reduction in mortality from treatments. A single numeric with default 0.2 that proportionally reduces death_rate values. E.g. with treatment_death_reduction = 0.2, a person with a 10 per cent pre-treatment risk of dying from Covid would have an 8 per cent risk with treatment.

n_population

Population size for each simulation. A single numeric defaulting to 2.6e6 (about 10 per cent of the Australian population).

n_start_infected

An integer for the number of people infected at the beginning of the simulation. An integer defaulting to 100L people infected at day 0.

n_daily_introductions

An integer for the number of new external infections introduced each day. An integer defaulting to 1L.

n_iterations

Number of iterations the simulation runs for. A single integer defaulting to 3L. Means that the simulation runs for serial_interval * n_iterations days.

run_simulations

The number of times the simulation is run. A single integer defaulting to 1L.

scenario

Name of the scenario. Defaults to "1". This is useful when using purrr::map or lapply over a number of scenarios.

Value

A tibble object with one row per scenario, simulation and iteration. For each row, columns provide information on:

scenario

The scenario name.

runid

The simulation run number.

iteration

The iteration of the scenario simulation run.

day

Days since beginning of simulation, where day = iteration * serial_iterval.

new_maybe_infected_i

the number of new possible Covid cases in iteration i (interpreted as contacts that would become cases without vaccines).

new_cases_i

the number of new Covid cases in iteration i.

new_local_cases_i

the number of new local transmission cases in iteration i.

new_os_cases_i

the number of new overseas/external cases introduced in iteration i.

new_cases_vaccinated2_i

the number of new cases that were fully vaccinated in iteration i.

new_hosp_i

the number of new cases hospitalised in iteration i.

current_hosp_i

current hospital demand in iteration i.

new_icu_i

the number of new cases requiring ICU in iteration i.

current_icu_i

current ICU demand iteration i.

new_dead_i

the number of new Covid dead in iteration i.

new_dead_vaccinated2_i

the number of new dead who were fully vaccinated in iteration i.

new_vaccinated_i

the number of new people fully vaccinated in iteration i.

total_cases_i

the cumulative number of Covid cases after iteration i.

total_dead_i

the cumulative number of Covid dead after iteration i.

total_vaccinations_i

the cumulative number of Covid vaccinations after iteration i.

rt_i

The average number of new infections in this iteration cased by a case in the previous iteration.Derived with rt_i = new_cases_i / lag(new_cases_i).

in_population

Input population in the simulation, equal to the n_population.

in_R

Input R value.

in_vaccination_levels

Input vaccination_levels.


grattan/covidReff documentation built on Dec. 20, 2021, 12:51 p.m.