pymc.HurdleNegativeBinomial#

class pymc.HurdleNegativeBinomial(name, psi, mu=None, alpha=None, p=None, n=None, **kwargs)[source]#

Hurdle Negative Binomial log-likelihood.

The negative binomial distribution describes a Poisson random variable whose rate parameter is gamma distributed.

The difference with ZeroInflatedNegativeBinomial is that the zeros are not inflated, they come from a completely independent process.

The pmf of this distribution is

\[\begin{split}f(x \mid \psi, \mu, \alpha) = \left\{ \begin{array}{l} (1 - \psi) \ \text{if } x = 0 \\ \psi \frac{\text{NegativeBinomialPDF}(x \mid \mu, \alpha))} {1 - \text{NegativeBinomialCDF}(0 \mid \mu, \alpha)} \ \text{if } x=1,2,3,\ldots \end{array} \right.\end{split}\]
Parameters:
psitensor_like of float

Expected proportion of Negative Binomial draws (0 < psi < 1)

alphatensor_like of float

Gamma distribution shape parameter (alpha > 0).

mutensor_like of float

Gamma distribution mean (mu > 0).

ptensor_like of float

Alternative probability of success in each trial (0 < p < 1).

ntensor_like of float

Alternative number of target success trials (n > 0)

Methods

HurdleNegativeBinomial.dist(psi[, mu, ...])