Skip to content

ENH: models for heavy-tailed count distributions #9697

Open

Description

@josef-pkt

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
...

google search found a discussion with references for Stan
https://discourse.mc-stan.org/t/implementing-heavy-tailed-count-distributions-numerical-issues/12208

I did not look yet at which ones would have a useful parameterization and are not too difficult to work with in a regression setting.

some other heavy-tailed discrete distribution have always downward sloping pdf:
Zipf, Zeta, logser, ...

example distribution from article referenced in 9696

code 0 [1,10) [10,100) [100,1000) [1000, 10000) (>=10000)
Pond 1 31 (34.4%) 37 (41.1%) 17 (16.7%) 5 (5.5%)    
Pond 2 9 (10%) 40 (44.4%) 20 (22.2%) 14 (15.5%) 5 (5.5%) 2 (2.2%)

two articles on Beta-Negative Binomial

Gorgi, Paolo. 2020. “Beta–Negative Binomial Auto-Regressions for Modelling Integer-Valued Time Series with Extreme Observations.” Journal of the Royal Statistical Society Series B: Statistical Methodology 82 (5): 1325–47. https://doi.org/10.1111/rssb.12394.

Wang, Zhaoliang. 2011. “One Mixed Negative Binomial Distribution with Application.” Journal of Statistical Planning and Inference 141 (3): 1153–60. https://doi.org/10.1016/j.jspi.2010.09.020.

generalized Waring, reference in Stan comments
https://www.sciencedirect.com/science/article/pii/S016794730900125X

BNB might be the most likely candidate because it is already in scipy
I don't remember any details about PIG in Hinde.

Activity

  1. josef-pkt commented on Nov 21, 2025

    @josef-pkt
    MemberAuthor

    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.

  2. josef-pkt commented on Nov 22, 2025

    @josef-pkt
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions