NB {polyester} | R Documentation |
Draw nonzero negative binomial random numbers
NB(basemeans, size, seed = NULL)
basemeans |
vector of means, one per draw |
size |
vector of size parameters (controlling the mean/variance relationship); one per draw |
seed |
optional seed to set before drawing |
vector of negative binomial draws from specified distributions,
where any zero draw is replaced with a 1. Length of return vector is
equal to length(basemeans)
.
randomNBs = NB(c(100, 4, 29), size=c(50, 2, 4), seed=21) randomNBs # 115, 5, 15