Formula and etc.

rgnzp(n, lambda, alpha = 0)

Arguments

n

Number of observations to be generated.

lambda

Vector that represents the mean (expected value) of the distribution (lambda > 0).

alpha

Vector that represents the dispersion parameter of the distribution. Values of alpha > 0 implies in overdispersion while alpha < 0 implies in subdispersion. When alpha = 0, the Generalized Poisson reduces to the Poisson distribution.

Value

rgnzp returns a vector of random generated numbers.

Details

The function to generate random numbers is implemented in C++.

Examples

rgnzp(n = 10, lambda = 5, alpha = 0)
#> [1] 2 5 4 2 3 3 2 4 4 3