knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

MOdelling REpeat VACcination (morevac)

Overview

To model the effects of repeated exposures to infectious diseases (e.g., infection and vaccination) over an individual’s lifetime, we developed a multi-annual, individual-based, stochastic model of infection and vaccination. This model and the associated functions comprise the morevac package. Our 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 proportion 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). The full model and assumptions are described by Ainslie and Riley 2022.

Figure 1. Model schematic of A) antigenic drift and vaccine update and B) individual susceptibility over time depending on exposure history. Colored regions in A represent the years in which a vaccine was used. The color change indicates that the vaccine was updated. The vertical red lines in B indicate an infections and the dashed vertical lines indicate vaccinations. Note the color of the vaccine lines in B match those in A indicating the match between the vaccine strain and cirulating virus and the impact of match or mismatch on susceptibility (black line in B).

Installation

  1. Install R

  2. Install the development version of serosolver from GitHub:

devtools::install_github("kylieainslie/morevac")
library(morevac)

Example

# load required packages
library(morevac)
library(rdist)
library(dplyr)
library(tidyr)
library(stringr)
library(ggplot2)

The function mutiannual initialises the population and then simulates infections and vaccinations over years within the population. By default, the model runs from 1820 to 2019 with a vaccination starting in 2000 with an assumed coverage of 50%. These assumptions can be changed using the arguments in multiannual.

# run multi-annual model
out <- multiannual()

The output produced by multiannual is a named list that contains the following elements:

str(out)

Using the output from multiannual, we can look at some of the model components graphically. For example, we can look at the attack rate over time using plot_attack_rates and using out$inf_history$inf_hist_mat as input. Note: the vaccination campaign begins in 2000.

# get attack rates
ar_out <- get_attack_rates(inf_history = out$inf_history$inf_hist_mat,
                           ages_mat = out$ages, years = 1820:2019)
# plot total attack rates
p_ar <- plot_attack_rates(dat = ar_out$attack_rates)
p_ar + geom_vline(xintercept = 2000, linetype = "dashed", color = "blue", linewidth = 1)


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