discr_si {EpiEstim}R Documentation

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 μ\mu, standard deviation σ\sigma and shift 11, the discrete probability wkw_k that the serial interval is equal to kk is:

wk=kF{μ1,σ}(k)+(k2)F{μ1,σ}(k2)2(k1)F{μ1,σ}(k1)+(μ1)(2F{μ1+σ2μ1,σ1+σ2μ1}(k1)F{μ1+σ2μ1,σ1+σ2μ1}(k2)F{μ1+σ2μ1,σ1+σ2μ1}(k))w_k = kF_{\{\mu-1,\sigma\}}(k)+(k-2)F_{\{\mu-1,\sigma\}} (k-2)-2(k-1)F_{\{\mu-1,\sigma\}}(k-1)\\ +(\mu-1)(2F_{\{\mu-1+\frac{\sigma^2}{\mu-1}, \sigma\sqrt{1+\frac{\sigma^2}{\mu-1}}\}}(k-1)- F_{\{\mu-1+\frac{\sigma^2}{\mu-1}, \sigma\sqrt{1+\frac{\sigma^2}{\mu-1}}\}}(k-2)- F_{\{\mu-1+\frac{\sigma^2}{\mu-1}, \sigma\sqrt{1+\frac{\sigma^2}{\mu-1}}\}}(k))

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

Value

Gives the discrete probability wkw_k that the serial interval is equal to kk.

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

## 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")

[Package EpiEstim version 2.2-4 Index]