You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: models for heavy-tailed count distributions #9697
just an idea based on #9696 last part in opening comment
more general issue #7480
possible candidates
PIG Poisson-Inverse Gaussian (PIG is used in Hinde's count book, articles AFAIR)
Beta-Negative Binomial available in scipy
discretized log-normal
...
Aside: statsmodels.distributions.discrete.DiscretizedCount has offset as a model __init__ attribute
For cases like discretized log-normal with small count, it might be better to treat it as a parameter to be estimated.
The only restriction is that it is in (0, 1) or maybe just that it is non-negative if the base distribution is on R+.
Otherwise it should be a regular parameter, differentiable and does not affect support. offset=0 would imply zero prob at zero for non-negative continuous base distribution.
There is possibly a nonlinear explanation for the observed "heavy-tailed" distribution.
The example in the article is for coli bacteria in lakes.
I don't know anything about the background of this.
However, in similar cases of pollution of lakes there can be "tipping", i.e. behavior changes after the pollution reaches a tipping point.
lake pollution tipping point.
According to google search AI, there is no lake pollution tipping point for coli bacteria, but that does not rule out that very large observations can be modelled by nonlinearities.
E.g. some sources of pollution can reach and affect the lake only when rain is very heavy or there is flooding.
(example: high water buffer channel in Vienna, Austria. The buffer channel is closed during regular water levels, but opened to the Danube river in high water, flooding situations. In the latter case, swimming is not allowed anymore.
The model and unconditional distribution would be bimodal, or have 3 modes if there is also zero-inflation, but the high mode could be capture by the "flooding" dummy.)
In these cases, machine learning models will always have a predictive advantage if they automatically include non-linearities, compared to a regression model that only includes linear terms.
Another possibility: Poisson mixture with e.g. two components.
If high state is a random effect, then it would be a mixture model, and the mixture could have large observations but still a light tail.
#7149 (comment)
AFAIU the distinction:
marginal mixture with fixed effects leads to under dispersion (But sum of 2 Poisson variables is still Poisson even if rates differ.)
marginal mixture with random effect (integrating out the mixing distribution) leads to over-dispersion.
Activity
josef-pkt commentedon Nov 21, 2025
Aside:
statsmodels.distributions.discrete.DiscretizedCounthasoffsetas a model__init__attributeFor cases like discretized log-normal with small count, it might be better to treat it as a parameter to be estimated.
The only restriction is that it is in (0, 1) or maybe just that it is non-negative if the base distribution is on R+.
Otherwise it should be a regular parameter, differentiable and does not affect support. offset=0 would imply zero prob at zero for non-negative continuous base distribution.
josef-pkt commentedon Nov 22, 2025
There is possibly a nonlinear explanation for the observed "heavy-tailed" distribution.
The example in the article is for coli bacteria in lakes.
I don't know anything about the background of this.
However, in similar cases of pollution of lakes there can be "tipping", i.e. behavior changes after the pollution reaches a tipping point.
lake pollution tipping point.
According to google search AI, there is no lake pollution tipping point for coli bacteria, but that does not rule out that very large observations can be modelled by nonlinearities.
E.g. some sources of pollution can reach and affect the lake only when rain is very heavy or there is flooding.
(example: high water buffer channel in Vienna, Austria. The buffer channel is closed during regular water levels, but opened to the Danube river in high water, flooding situations. In the latter case, swimming is not allowed anymore.
The model and unconditional distribution would be bimodal, or have 3 modes if there is also zero-inflation, but the high mode could be capture by the "flooding" dummy.)
In these cases, machine learning models will always have a predictive advantage if they automatically include non-linearities, compared to a regression model that only includes linear terms.
Another possibility: Poisson mixture with e.g. two components.
If high state is a random effect, then it would be a mixture model, and the mixture could have large observations but still a light tail.
#7149 (comment)
AFAIU the distinction:
marginal mixture with fixed effects leads to under dispersion (But sum of 2 Poisson variables is still Poisson even if rates differ.)
marginal mixture with random effect (integrating out the mixing distribution) leads to over-dispersion.