powered by
Generates random samples from the convolution of arbitrary negative binomial random variables.
rnbconv(mus, phis, ps, n.samp, n.cores = 1)
A numeric vector of random deviates.
Vector of individual mean values
Vector of individual dispersion parameters. Equivalent to 'size' in dnbinom.
Vector of individual probabilities of success.
The number of samples per distribution
The number of CPU cores to use in the evaluation. Allows parallelization.
rnbconv(mus = c(100, 10), phis = c(5, 8), n.samp = 10)
Run the code above in your browser using DataLab