View source: R/delay_calculator.R
| delay_calculator | R Documentation |
The total infectiousness at each observed time point is calculated
by \sum_{s=1}^t I_{t-s}w_s, where I denotes the vector containing
observed incidence, and w denotes the generation interval
distribution. Typically, the generation interval is challenging to estimate
from data, so the serial interval is used instead. The serial interval
distribution expresses the probability
of a secondary infection caused by a primary infection which occurred s
days earlier.
delay_calculator(
observed_counts,
x = NULL,
dist_gamma = c(2.5, 2.5),
delay_distn = NULL,
delay_distn_periodicity = NULL,
xout = x
)
observed_counts |
vector of the observed daily infection counts |
x |
a vector of positions at which the counts have been observed. In an ideal case, we would observe data at regular intervals (e.g. daily or weekly) but this may not always be the case. May be numeric or Date. |
dist_gamma |
Vector of length 2. These are the shape and scale for the assumed serial interval distribution. Roughly, this distribution describes the probability of an infectious individual infecting someone else after some period of time after having become infectious. As in most literature, we assume that this interval follows a gamma distribution with some shape and scale. |
delay_distn |
in the case of a non-gamma delay distribution,
a vector or matrix (or |
delay_distn_periodicity |
Controls the relationship between the spacing
of the computed delay distribution and the spacing of |
xout |
a vector of positions at which the results should be returned.
By default, this will be the same as |
A vector containing the total infectiousness at each
point xout.
delay_calculator(c(3, 2, 5, 3, 1), dist_gamma = c(2.5, 2.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.