epidemic_age_dist: Calculates the age distribution of an epidemic

View source: R/epidemic_age_dist.r

epidemic_age_distR Documentation

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)

sbfnk/epimixr documentation built on Nov. 3, 2024, 10:20 p.m.