Description Usage Arguments Details Value Author(s) References Examples
Density and random generation for the multiplicative binomial distribution
1 2 | dmultbinom(x = NULL, size, p, psi, log = FALSE)
rmultbinom(n = 1, size, prob, psi)
|
n |
number of observations |
size |
number of trials |
p |
probability parameter, same as prob |
prob |
probability parameter |
psi |
dispersion parameter. Negative values indicate over-dispersion and positive values give under-dispersed data. |
x |
value to evaluate density at. If null, the entire distribution is returned. |
log |
logical; if TRUE, probabilities p are given as log(p). |
Both functions first evaluate the density at all possible values of x, and then calculate the normalising constant. To generate random variables a uniform random variable is then called and the interval it falls into on the cumulative density is the value of the random variable returned.
dmultbinom
gives the density and rmultbinom
generates random deviates.
If x is null, then the density at all values in the support is returned. Note that the indexing of this vector is out by one (i.e. the first element corresponds to x=0).
Richard Wilkinson
See Altham 1978 for the density function.
1 2 3 | rmultbinom(n=10, size=12, p=0.1, psi=0.2)
dmultbinom(x=1, size=12, p=0.1, psi=0.2)
dmultbinom(size=12, p=0.1, psi=0.2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.