multiannual: Multi-annual model of infection and vaccination

View source: R/multiannual.R

multiannualR Documentation

Multi-annual model of infection and vaccination

Description

This function implements a multi-annual, individual-based, stochastic model of infection and vaccination. The model incorporates three main components: (1) viral evolution, specifically antigenic drift of the infecting virus over time, (2) vaccine kinetics influencing the amount of protection conferred by the vaccine, namely antigenic match of the circulating strain and vaccine strain, waning, and take (defined as the propor- tion of individuals who receive the vaccine and have an immune response), and (3) individual level characteristics, such as age and prior exposure history. All three components are then used to inform an individual’s susceptibility to infection at each time point (here, considered to be one year).

Usage

multiannual(
  n = 10000,
  years = 1820:2019,
  max_age = 80,
  start_vac_year = 2000,
  vac_coverage = c(rep(0.5, 80)),
  betas = c(0.4, rep(0.2, 199)),
  vac_protect = 0.7,
  vac_strategy = 1,
  rho = 0.9,
  wane = 0,
  take = 1,
  drift_rate = 1,
  drift_off = FALSE,
  epsilon = 0,
  seed = NULL
)

Arguments

n

number of individuals to be simulated

years

vector of years to run simulation over (YYYY format)

max_age

maximum age of an individual (removed from population after max_age)

start_vac_year

year that vaccination starts (YYYY)

vac_coverage

vaccination coverage

betas

vector of force of infection parameters for every year

vac_protect

protective effect of vaccine

vac_strategy

Integer value indicating frequency of vaccination (1 = annual, 2 = biannual, 3 =triannual,...)

rho

correlation of vaccination

wane

amount of protection of vaccine due to waning (0, 1) (inclusive)

take

percentage of vaccine take (0, 1) (inclusive)

drift_rate

rate of exponential drift: exp(drift_rate) used to calculate amount of drift each year

drift_off

logical. if TRUE there is no antigenic drift

epsilon

exposure penalty. Takes values between 0 and 1.

seed

set random seed

Value

a named list that contains the following elements: - 'inf_history': a named list of elements related to the infection histories of each individual, including - 'inf_hist_mat': a matrix of infection histories, where each row represents each individual and columns represent years. A value of 1 in inf_hist_mat[1,j] indicates that person i had an infection in year j. - 'suscept_mat': a matrix that contains an individuals susceptibility to infection over time. Values range from 0 (completely immune) to 1 (completely susceptible). - 'vac_history': a named list of elements related to the vaccination histories of each individual, including - 'n': number of individuals - 'vac_hist_mat': a matrix of vaccination histories, where each row represents each individual and columns represent years. A value of 1 in vac_hist_mat[1,j] indicates that person i was vaccinated in year j. - 'v': a matrix of the number of years since last vaccination. If never vaccinated the value of v = 999 and then increases each year until vaccination occurs. In the year that an individual was vaccinated v = 0. - ‘ages': matrix of each individual’s age over time. We assume that an individual dies at age 80 and is then replaced by another person aged 0. - 'drift': a named list of elements related to viral atigenic drift over time with the following elements: - 'drift': a data frame with the cumulative amount of drift (drawn from an exponential distribution with rate specified by the user) over time. The data frame has two columns: 'x' represents the year and 'y' represents the cumulative drift from the first year. - 'antigenic_dist' a matrix with the antigenic distance over time as calculated by 'pdist'. - 'vac_update': an identity vector indicating in which years the vaccine formula should be updated (1 = yes, 0 = no). - 'gammas': a vector of the protection conferred by vaccination. In years in which the vaccine formula is a perfect match to the virus strain, then gamma = 0.3. In years in which the vaccination is not a perfect match, the reduction in protection declines until the vaccine strain is updated again. - 'vac_this_year': an identity vector indicating in which years vaccination should occur (1 = yes, 0 = no).


kylieainslie/MoreVac documentation built on Oct. 9, 2024, 1:53 p.m.