View source: R/function_fordistribution.R
| d_nextgenclusterdistn | R Documentation |
Density, cumulative distribution, quantile, and random variable generating functions for the next-generation cluster size distribution with pre-defined epidemiological parameters.
d_nextgenclusterdistn(
x = 5,
seed.size = 1,
epi.para = list(mean = 1, disp = 0.5, shift = 0.2),
offspring.type = "D",
is.log = FALSE
)
p_nextgenclusterdistn(
q = 10.5,
seed.size = 1,
epi.para = list(mean = 1, disp = 0.5, shift = 0.2),
offspring.type = "D",
lower.tail = TRUE,
is.log = FALSE
)
q_nextgenclusterdistn(
p = 0.8,
seed.size = 1,
epi.para = list(mean = 1, disp = 0.5, shift = 0.2),
offspring.type = "D",
lower.tail = TRUE
)
r_nextgenclusterdistn(
n = 10,
seed.size = 1,
epi.para = list(mean = 1, disp = 0.5, shift = 0.2),
offspring.type = "D"
)
x |
A scalar, or a vector of positive integer, for the next-generation cluster size. The value of |
seed.size |
A scalar, or a vector of positive integer.
For vector type of |
epi.para |
A list ( |
offspring.type |
A character label (
By default, |
is.log |
A logical variable, under which probability would be taken natural logarithm, if |
q |
A scalar, or a vector of positive number (not necessarily integer), for the next-generation cluster size. The value of |
lower.tail |
A logical variable, under which the probability is cumulative distribution function (CDF, i.e., P(X <= x)), if |
p |
A scalar, or a vector of probability (i.e., ranging from 0 to 1). |
n |
A scalar of positive integer. |
Function d_nextgenclusterdistn() returns the probability of having a next-generation case cluster with size x generated by seed.size index cases, where (seed.size) is given.
Function p_nextgenclusterdistn() returns the probability of having a next-generation case cluster with size less than or equal to, or larger than q (depending on the value of lower.tail), generated by seed.size index cases, where (seed.size) is given.
Function q_nextgenclusterdistn() returns a value such that there is a probability of p for having a next-generation case cluster with size less than or equal to, or larger than this value (depending on the value of lower.tail) generated by seed.size index cases, where (seed.size) is given.
Function r_nextgenclusterdistn() returns a set of random variables of n next-generation cluster size, given (seed.size).
For the values returned from the four functions,
d_nextgenclusterdistn() is the probability mass function (PMF), and it returns value of probability (i.e., ranging from 0 to 1);
p_nextgenclusterdistn() is the cumulative distribution function (CDF), and it returns value of probability (i.e., ranging from 0 to 1);
q_nextgenclusterdistn() is the quantile function, and it returns value of quantile (positive integer); and
r_nextgenclusterdistn() is the random variable generating function, and it generates a set of n random variables (positive integers).
Depending on the values of parameters, the functions could take hours to complete, given the double-summation nature for the Delaporte distribution.
Blumberg S, Lloyd-Smith JO. Inference of R 0 and transmission heterogeneity from the size distribution of stuttering chains. PLoS Computational Biology. 2013 May 2;9(5):e1002993. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pcbi.1002993")}
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pcbi.1010281")}
Delaporte for the parameterization of Delaporte distribution.
## Please see the "Usage" section.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.