distributions {coenocliner} | R Documentation |
Wrappers to random number generators for use with coenocliner
Description
These functions are simple wrappers around existing random number generators in R to provide stochastic count data for simulated species.
Usage
NegBin(n, mu, alpha)
Poisson(n, mu)
Bernoulli(n, mu)
Binomial(n, mu, size)
BetaBinomial(n, mu, size, theta)
ZIP(n, mu, zprobs)
ZINB(n, mu, alpha, zprobs)
ZIB(n, mu, size, zprobs)
ZIBB(n, mu, size, theta, zprobs)
Arguments
n |
the number of random draws, equal to number of species times the number of gradient locations. |
mu |
the mean or expectation of the distribution. For |
alpha |
numeric; dispersion parameter for the negative binomial distribution. May be a vector of length |
size |
numeric; binomial denominator, the total number of individuals counted for example |
theta |
numeric; a positive inverse overdispersion parameter for the Beta-Binomial distribution. Low values give high overdispersion. The variance is |
zprobs |
numeric; zero-inflation parameter giving the proportion of extraneous zeros. Must be in range |
Value
a vector of random draws from the stated distribution.
Author(s)
Gavin L. Simpson
References
Bolker, B.M. (2008) Ecological Models and Data in R. Princeton University Press.