Package 'epimixr'

Title: Epidemiological analysis using social mixing matrices
Description: Provides methods to conduct epidemiological analysis using social mixing matrices, such as calculating contact-adjusted immunity levels or age distributions of epidemics.
Authors: Sebastian Funk [aut, cre]
Maintainer: Sebastian Funk <[email protected]>
License: MIT + file LICENSE
Version: 0.1
Built: 2024-08-19 02:46:38 UTC
Source: https://github.com/sbfnk/epimixr

Help Index


Estimate reproduction number from contact information and immunity profile

Description

This takes a contact survey to derive a contact matrix and rescales contacts to represent contacts with susceptibles. This is then combined with information on the basic reproduction number R0 to calculate the effective or net reproduction number.

Usage

adjust_immunity(mixing_matrix, immunity, vector = FALSE)

Arguments

mixing_matrix

A mixing matrix, as returned by socialmixr::contact_matrix

immunity

immunity profile; this should be given as a vector of the same length as the number of rows/columns of the mixing matrix; each element of the vector should contain a value <1 representing the proportion of the population immune in the corresponding age group; any element set to "herd" will be set to 1-1/R0

vector

if TRUE, will return the eigenvector corresponding to the dominant eigenvector instead of adjusted immunity; this corresponds to the expected stable age distribution of infections in case of an outbreak

Value

a list contain vectors of adjusted immunities

Author(s)

Sebastian Funk

Examples

library("socialmixr")
mixing <- contact_matrix(survey = polymod, age.limits
  = c(0, 5, 10))
adjust_immunity(mixing$matrix, immunity = c(0, 0.5, 0.8))

Calculates the age distribution of an epidemic

Description

calculates the age distribution in an epidemic setting using the iterative method of: J Wallinga, P Teunis, M Kretschmar (2006) Using Data on Social Contacts to Estimate Age-specific Transmission Parameters for Respiratory-spread Infectious Agents. Am J Epidemiol 164(10), 945-946.

Usage

epidemic_age_dist(
  mixing_matrix,
  r_0,
  immunity = 0,
  final_size_start = 0.01,
  tol = 1e-05
)

Arguments

mixing_matrix

A mixing matrix or set of mixing matrices, as returned by socialmixr::contact_matrix

r_0

basic reproduction number

immunity

proportion immune before the epidemic

final_size_start

starting value for inidence

tol

tolerance for stopping the iteration

Value

A matrix of the final size(s) (proportion of susceptibles infected) in each age group (one row per matrix contained in mixing)

Examples

library("socialmixr")
mixing <- contact_matrix(survey = polymod, age.limits = c(0, 5, 10))
epidemic_age_dist(mixing$matrix, r_0 = 5, immunity = 0.50)

Project immunity from a baseline

Description

Project immunity from a baseline via vaccination coverage rates

Usage

project_immunity(
  baseline_immunity,
  baseline_year,
  year,
  coverage,
  schedule,
  maternal_immunity,
  efficacy
)

Arguments

baseline_immunity

baseline immunity, as a named vector; the names correspond to lower limits of the age groups, and the vector itself to the corresponding levels of immunity.

baseline_year

year at which baseline immunity is taken (corresponding to a column in the coverage argument)

year

year to project to

coverage

coverage with multiple vaccine doses, given as a matrix in which each row is a dose and each (named) column a year

schedule

the ages at which vaccines are given (in years).

maternal_immunity

the proportion maternally immune.

efficacy

vaccine efficacy.

Value

a data frame of immunity levels by age group (as in baseline_immunity).

Author(s)

Sebastian Funk <[email protected]>

Examples

baseline_immunity <- c(`2` = 0.85, `5` = 0.9, `10` = 0.95)
coverage <- matrix(rep(0.9, 10), nrow = 2)
colnames(coverage) <- as.character(seq(2015, 2019))
project_immunity(
  baseline_immunity, 2018, 2019, coverage = coverage,
  schedule = c(1, 2), 0.5, 0.95
)