rnbconv {nbconv}R Documentation

Random deviates

Description

Generates random samples from the convolution of arbitrary negative binomial random variables.

Usage

rnbconv(mus, phis, ps, n.samp, n.cores = 1)

Arguments

mus

Vector of individual mean values

phis

Vector of individual dispersion parameters. Equivalent to 'size' in dnbinom.

ps

Vector of individual probabilities of success.

n.samp

The number of samples per distribution

n.cores

The number of CPU cores to use in the evaluation. Allows parallelization.

Value

A numeric vector of random deviates.

Examples

rnbconv(mus = c(100, 10), phis = c(5, 8), n.samp = 10)


[Package nbconv version 1.0.1 Index]