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

discr_si

Discretized Generation Time Distribution Assuming A Shifted Gamma Distribution


Description

discr_si computes the discrete distribution of the serial interval, assuming that the serial interval is shifted Gamma distributed, with shift 1.

Usage

discr_si(k, mu, sigma)

Arguments

k

Positive integer, or vector of positive integers for which the discrete distribution is desired.

mu

A positive real giving the mean of the Gamma distribution.

sigma

A non-negative real giving the standard deviation of the Gamma distribution.

Details

Assuming that the serial interval is shifted Gamma distributed with mean μ, standard deviation σ and shift 1, the discrete probability w_k that the serial interval is equal to k is:

w_k = kF_{\{μ-1,σ\}}(k)+(k-2)F_{\{μ-1,σ\}} (k-2)-2(k-1)F_{\{μ-1,σ\}}(k-1)\\ +(μ-1)(2F_{\{μ-1+\frac{σ^2}{μ-1}, σ√{1+\frac{σ^2}{μ-1}}\}}(k-1)- F_{\{μ-1+\frac{σ^2}{μ-1}, σ√{1+\frac{σ^2}{μ-1}}\}}(k-2)- F_{\{μ-1+\frac{σ^2}{μ-1}, σ√{1+\frac{σ^2}{μ-1}}\}}(k))

where F_{\{μ,σ\}} is the cumulative density function of a Gamma distribution with mean μ and standard deviation σ.

Value

Gives the discrete probability w_k that the serial interval is equal to k.

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

## Computing the discrete serial interval of influenza
mean_flu_si <- 2.6
sd_flu_si <- 1.5
dicrete_si_distr <- discr_si(seq(0, 20), mean_flu_si, sd_flu_si)
plot(seq(0, 20), dicrete_si_distr, type = "h",
          lwd = 10, lend = 1, xlab = "time (days)", ylab = "frequency")
title(main = "Discrete distribution of the serial interval of influenza")

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.