rgenpois function

The Generalized Poisson Distribution

The Generalized Poisson Distribution

Density, distribution function and random generation function for the generalized Poisson distribution.

rgenpois(n, lambda1, lambda2)

Arguments

  • n: number of observations
  • lambda1: a single numeric value for parameter lambda1 with lambda1>0lambda1 > 0
  • lambda2: a single numeric value for parameter lambda2 with 0lamdba2<10 \le lamdba2 < 1. When lambda2=0, the generalized Poisson distribution reduces to the Poisson distribution

Returns

rgenpois generates random deviates of the generalized Poisson distribution.

Details

The generalized Poisson distribution has the density

p(x)=λ1(λ1+λ2x)x1exp(λ1λ2x))x! p(x) = \lambda_1 (\lambda_1 + \lambda_2 \cdot x)^{x-1}\frac{ \exp(-\lambda_1-\lambda_2 \cdot x) )}{x!}%p(x) = lambda1 (lambda1 + lambda2 x)^(x-1) exp(-lambda1-lambda2 x) )/x!

for x=0,1,2,x = 0,1,2,\ldots,b with E(x)=lambda1/(1lambda2)E(x)=lambda1/(1-lambda2) and variance var(x)=lambda1/(1lambda2)3var(x)=lambda1/(1-lambda2)^3.

Examples

dgenpois(x = seq(0,20), lambda1 = 10, lambda2 = 0.5) pgenpois(q = 5, lambda1 = 10, lambda2 = 0.5) hist(rgenpois(n = 1000, lambda1 = 10, lambda2 = 0.5) )

References

Joe, H., Zhu, R. (2005). Generalized poisson distribution: the property of mixture of poisson and comparison with negative binomial distribution. Biometrical Journal 47 (2):219--229.

See Also

pgenpois, dgenpois; Distributions for other standard distributions, including dpois for the Poisson distribution.

Author(s)

Based on Joe and Zhu (2005). Implementation by Vitali Witowski (2013).

  • Maintainer: Foraita Ronja
  • License: GPL (>= 2)
  • Last published: 2025-01-31