Learn R Programming

modelSSE (version 0.1-3)

d_reproductiondistn: The distribution of individual reproduction number

Description

This function (i.e., d_reproductiondistn()) is the probability density function (PDF) of individual reproduction number that was modelled as a shifted gamma distribution.

Usage

d_reproductiondistn(
  x = 1,
  epi.para = list(mean = 1, disp = 0.5, shift = 0.2),
  offspring.type = "D",
  is.log = FALSE
)

Value

d_reproductiondistn() is the probability density function (PDF), and it returns value of probability density (non-negative value).

Arguments

x

A scalar, or a vector of non-negative integer.

epi.para

A list (list) of pre-defined epidemiological parameters for offspring distribution, in the format of list(mean = ?, disp = ?, shift = ?), where the three parameters accept non-negative values. Each parameter can be either a scalar, or a vector. For the parameters being assigned with values of vectors, the vectors should be of the same length. For Delaporte distribution, the value of mean should be larger than the value of shift.

offspring.type

A character label (character) indicating the type of distribution used to describe the offspring distribution. It only accepts one of the following values:

  • "D" indicates the Delaporte distribution for offspring cases, where reproduction number follows a shifted gamma distribution;

  • "NB" indicates the negative binomial distribution for offspring cases, where reproduction number follows a (non-shifted, or standard) gamma distribution;

  • "G" indicates the geometric distribution for offspring cases, where reproduction number follows an exponential distribution; or

  • "P" indicates the Poisson distribution for offspring cases, where reproduction number follows a Dirac delta distribution.

By default, offspring.type = 'D'.

is.log

A logical variable, under which probability would be taken natural logarithm, if is.log = TRUE. By default, is.log = FALSE.

References

Lloyd-Smith JO, Schreiber SJ, Kopp PE, Getz WM. Superspreading and the effect of individual variation on disease emergence. Nature. 2005;438(7066):355-359. tools:::Rd_expr_doi("10.1038/nature04153")

Zhao S, Chong MK, Ryu S, Guo Z, He M, Chen B, Musa SS, Wang J, Wu Y, He D, Wang MH. Characterizing superspreading potential of infectious disease: Decomposition of individual transmissibility. PLoS Computational Biology. 2022;18(6):e1010281. tools:::Rd_expr_doi("10.1371/journal.pcbi.1010281")

Examples

Run this code

## an example to visualize individual reproduction number is as follows.
plot(seq(0.01,9.99, length.out = 1001), d_reproductiondistn(
  x = seq(0,10, length.out = 1001),
  epi.para = list(mean = 2, disp = 1.5, shift = 0.5),
  offspring.type = "D",
  is.log = FALSE
), type = 'l', xlab = 'individual reproduction number', ylab = 'density')

Run the code above in your browser using DataLab