NB {polyester} | R Documentation

## Draw nonzero negative binomial random numbers

### Description

Draw nonzero negative binomial random numbers

### Usage

    NB(basemeans, size, seed = NULL)

### Arguments

`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

### Value

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)`.

### Examples

      randomNBs = NB(c(100, 4, 29), size=c(50, 2, 4), seed=21)
      randomNBs  # 115, 5, 15

[Package polyester version 1.26.0 Index]