discr_si: Discretized Generation Time Distribution Assuming A Shifted...

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

View source: R/discr_si.R

Description

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

Usage

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

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

overall_infectivity, estimate_R

Examples

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

annecori/EpiEstim documentation built on May 4, 2021, 9:41 a.m.