dgenpois {HMMpa} | R Documentation |
The Generalized Poisson Distribution
Description
Density function for the generalized Poisson distribution.
Usage
dgenpois(x, lambda1, lambda2)
Arguments
x |
a vector of (non-negative integer) quantiles |
lambda1 |
a single numeric value for parameter |
lambda2 |
a single numeric value for parameter |
Details
The generalized Poisson distribution has the density
p(x) = \lambda_1 (\lambda_1 + \lambda_2 \cdot x)^{x-1}
\frac{ \exp(-\lambda_1-\lambda_2 \cdot x) )}{x!}
for x = 0,1,2,\ldots
,b
with \mbox{E}(X)=
\frac{\lambda_1}{1-\lambda_2}
and variance
\mbox{var}(X)=\frac{\lambda_1}{(1-\lambda_2)^3}
.
Value
dgenpois
gives the density of the generalized Poisson distribution.
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
pgenpois
, rgenpois
;
Distributions for other standard distributions,
including dpois
for the Poisson distribution.
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) )