statsmodels.discrete.discrete_model.NegativeBinomial.loglike

NegativeBinomial.loglike(params)[source]

Loglikelihood for negative binomial model

Parameters:
paramsarray_like

The parameters of the model. If loglike_method is nb1 or nb2, then the ancillary parameter is expected to be the last element.

Returns:
llffloat

The loglikelihood value at params

Notes

Following notation in Greene (2008), with negative binomial heterogeneity parameter α:

λi=exp(Xβ)θ=1/αgi=θλiQwi=gi/(gi+λi)ri=θ/(θ+λi)lnLi=lnΓ(yi+gi)lnΓ(1+yi)+giln(ri)+yiln(1ri)

where :math`Q=0` for NB2 and geometric and Q=1 for NB1. For the geometric, α=0 as well.