GeneralizedPoisson#
- class pymc_extras.distributions.GeneralizedPoisson(name, *args, **kwargs)[source]#
Generalized Poisson. Used to model count data that can be either overdispersed or underdispersed. Offers greater flexibility than the standard Poisson which assumes equidispersion, where the mean is equal to the variance. The pmf of this distribution is
\[f(x \mid \mu, \lambda) = \frac{\mu (\mu + \lambda x)^{x-1} e^{-\mu - \lambda x}}{x!}\]Support
\(x \in \mathbb{N}_0\)
Mean
\(\frac{\mu}{1 - \lambda}\)
Variance
\(\frac{\mu}{(1 - \lambda)^3}\)
- Parameters:
mu (tensor_like of float) – Mean parameter (mu > 0).
lam (tensor_like of float) – Dispersion parameter (max(-1, -mu/4) <= lam <= 1).
Notes
When lam = 0, the Generalized Poisson reduces to the standard Poisson with the same mu. When lam < 0, the mean is greater than the variance (underdispersion). When lam > 0, the mean is less than the variance (overdispersion).
References
The PMF is taken from [1] and the random generator function is adapted from [2]. .. [1] Consul, PoC, and Felix Famoye. “Generalized Poisson regression model.”
Communications in Statistics-Theory and Methods 21.1 (1992): 89-109.
- __init__()#
Methods
__init__
()dist
(mu, lam, **kwargs)Create a tensor variable corresponding to the cls distribution.
logp
(mu, lam)support_point
(size, mu, lam)Attributes
rv_op