Skip to contents

Negative binomial random numbers parametrized in terms of mean and dispersion coefficient

Usage

rnbinom_mean_disp(n, mn, disp)

Arguments

n

number of samples to draw

mn

mean of distribution; Must be > 0.

disp

dispersion coefficient (var/mean); Must be > 1.

Value

vector containing the random numbers

Author

Flavio Finger

Examples

rnbinom_mean_disp(n = 5, mn = 4, disp = 2)
#> [1] 8 7 6 9 6