dgenpois: The Generalized Poisson Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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

Usage

1
2
3
dgenpois(x, lambda1, lambda2)
pgenpois(q, lambda1, lambda2)
rgenpois(n, lambda1, lambda2)

Arguments

x

a vector object of (non-negative integer) quantiles.

q

a numeric value.

n

number of random values to return.

lambda1

a single numeric value for parameter lambda1 with lambda1 > 0.

lambda2

a single numeric value for parameter lambda2 with 0 ≤ lamdba2 < 1. When lambda2=0, the generalized Poisson distribution reduces to the Poisson distribution.

Details

The generalized Poisson distribution has the density

p(x) = lambda1 (lambda1 + lambda2 x)^(x-1) exp(-lambda1-lambda2 x) )/x!

for x = 0,1,2,…,b

with E(x)=lambda1/(1-lambda2) and variance var(x)=lambda1/(1-lambda2)^3.

Value

dgenpois gives the density, pgenpois gives the distribution function and rgenpois generates random deviates.

Author(s)

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

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

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

Examples

1
2
3
4
5
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) )

HMMpa documentation built on May 2, 2019, 7:58 a.m.