overall_infectivity: Overall Infectivity Due To Previously Infected Individuals

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/overall_infectivity.R

Description

overall_infectivity computes the overall infectivity due to previously infected individuals.

Usage

1
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)

Anne Cori a.cori@imperial.ac.uk

References

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

See Also

discr_si, estimate_R

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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")

Example output



EpiEstim documentation built on Jan. 7, 2021, 5:10 p.m.