Description Usage Arguments Details Value
Draw samples from a negative binomial distribution (poisson log-normal mixture)
1 | draw_negbinom(n, mu, sd)
|
n |
A vector of integer(-ish) values giving the sample sizes for each group |
mu |
A vector of reals > 0 giving the means for each group. |
sd |
A vector of reals > 0 giving the standard deviations for each group. |
This functions parametrises the negative binomial differently than
the similar R function. Most notable difference is that apart from
the mean, this function uses the standard deviation. While this is more
intuitive than the "size", it does complicate things a bit since allowable
value for the standard deviation depend on the mean. The function checks
this.
In addition, the lengths of n, mu, and sd should be
either the number of groups or 1, in which case it is assumed to be the
same for all groups.
A function generating samples from the specified negative binomial distributions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.