These functions are simple wrappers around existing random number generators in R to provide stochastic count data for simulated species.
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)
the number of random draws, equal to number of species times the number of gradient locations.
the mean or expectation of the distribution. For Bernoulli
, Binomial
, and BetaBinomial()
this is the probability of occurrence as given by the response function.
numeric; dispersion parameter for the negative binomial distribution. May be a vector of length length(mu)
. The NB2 parametrization of the negative binomial is used here, in which \(\alpha\) is positively related to the amount of extra dispersion in the simulated data. As such, where \(\alpha = 0\), we would have a Poisson distribution. alpha
can be supplied a value of 0
, in which case NegBin
and ZINB
return random draws from the Poisson or zero-inflated Poisson distributions, respectively. Negative values of alpha
are not allowed and will generate an error.
numeric; binomial denominator, the total number of individuals counted for example
numeric; a positive inverse overdispersion parameter for the Beta-Binomial distribution. Low values give high overdispersion. The variance is size*mu*(1-mu)*(1+(size-1)/(theta+1))
(Bolker, 2008)
numeric; zero-inflation parameter giving the proportion of extraneous zeros. Must be in range \(0 \dots 1\).
a vector of random draws from the stated distribution.
Bolker, B.M. (2008) Ecological Models and Data in R. Princeton University Press.