Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

overall_infectivity

Overall Infectivity Due To Previously Infected Individuals


Description

overall_infectivity computes the overall infectivity due to previously infected individuals.

Usage

overall_infectivity(incid, si_distr)

Arguments

incid

One of the following

  • A vector (or a dataframe with a single column) of non-negative integers containing an incidence time series

  • A dataframe of non-negative integers with two columns, so that incid$local contains the incidence of cases due to local transmission and incid$imported contains the incidence of imported cases (with incid$local + incid$imported the total incidence).

Note that the cases from the first time step are always all assumed to be imported cases.

si_distr

Vector of probabilities giving the discrete distribution of the serial interval.

Details

The overall infectivity λ_t at time step t is equal to the sum of the previously infected individuals (given by the incidence vector I, with I = incid$local + incid$imported if I is a matrix), weigthed by their infectivity at time t (given by the discrete serial interval distribution w_k). In mathematical terms:
λ_t = ∑_{k=1}^{t-1}I_{t-k}w_k

Value

A vector which contains the overall infectivity λ_t at each time step

Author(s)

References

Cori, A. et al. A new framework and software to estimate time-varying reproduction numbers during epidemics (AJE 2013).

See Also

Examples

## load data on pandemic flu in a school in 2009
data("Flu2009")

## compute overall infectivity
lambda <- overall_infectivity(Flu2009$incidence, Flu2009$si_distr)
par(mfrow=c(2,1))
plot(Flu2009$incidence, type = "s", xlab = "time (days)", ylab = "incidence")
title(main = "Epidemic curve")
plot(lambda, type = "s", xlab = "time (days)", ylab = "Infectivity")
title(main = "Overall infectivity")

EpiEstim

Estimate Time Varying Reproduction Numbers from Epidemic Curves

v2.2-4
GPL (>= 2)
Authors
Anne Cori [aut, cre] (<https://orcid.org/0000-0002-8443-9162>), Simon Cauchemez [ctb], Neil M. Ferguson [ctb] (<https://orcid.org/0000-0002-1154-8093>), Christophe Fraser [ctb] (<https://orcid.org/0000-0003-2399-9657>), Elisabeth Dahlqwist [ctb] (<https://orcid.org/0000-0001-5797-6803>), P. Alex Demarsh [ctb], Thibaut Jombart [ctb] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [ctb] (<https://orcid.org/0000-0003-1458-7108>), Justin Lessler [ctb] (<https://orcid.org/0000-0002-9741-8109>), Shikun Li [ctb], Jonathan A. Polonsky [ctb] (<https://orcid.org/0000-0002-8634-4255>), Jake Stockwin [ctb], Robin Thompson [ctb] (<https://orcid.org/0000-0001-8545-5212>), Rolina van Gaalen [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.