Skip to content

Add beta negative binomial distribution lpmf #3107

@lingium

Description

@lingium

Description

This issue is a feature proposal.

Beta negative binomial distribution is three-parameter discrete distribution, often used to model overdispersed count data or data with a heavy tail.

PMF:

$$f(n|r, \alpha ,\beta)={\frac {\Gamma (r+n)}{n!\Gamma (r)}}{\frac {\Gamma (\alpha +r)\Gamma (\beta +n)\Gamma (\alpha +\beta )}{\Gamma (\alpha +r+\beta +n)\Gamma (\alpha )\Gamma (\beta )}}$$

where

$$n \in \mathbb {N} _{0}, \quad r > 0, \quad \alpha > 0, \quad \beta > 0$$

Tagging @s-mishra and @olli0601 to track the process.

Expected Output

real beta_neg_binomial_lpmf(ints n, reals r, reals alpha, reals beta)

Checklist

This will require a beta_neg_binomial_lpmf with analytical derivatives.

  • _lpmf

Tests

  • _lpmf

Current Version:

v4.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions