Description Usage Arguments Details Value
This function draws secondary cases from a negative binomial distribution,
but constrained to a maximum (max_secondaries
),
where R0
is the mean (mu in rnbinom) and k
is the dispersion parameter
(size in rnbinom). In addition, if a case is an introduction, secondaries
are additionally constrained to a minimum (min_secondaries
) number of cases.
In general this serves as an example of how to customize functions using
mget and a general template function of function(n, params) ....
1 2 3 4 | nbinom_constrained_min(
n,
params = list(R0 = 1.2, k = 1, max_secodndaries = 100, min_secondaries = 1)
)
|
n |
number to draw |
params |
list of parameters |
Passed to the param secondary_fun
in simrabid
.
integer vector, number of secondary cases, of length n
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.