Logo

scikits.statsmodels.genmod.families.family.NegativeBinomial.loglike

NegativeBinomial.loglike(Y, fittedvalues=None)[source]

The loglikelihood function for the negative binomial family.

Parameters :

Y : array-like

Endogenous response variable

fittedvalues : array-like

The linear fitted values of the model. This is dot(exog,params).

Returns :

llf : float

The value of the loglikelihood function evaluated at (Y,mu,scale) as defined below.

Notes

sum(Y*log(alpha*exp(fittedvalues)/(1+alpha*exp(fittedvalues))) - log(1+alpha*exp(fittedvalues))/alpha + constant)

where constant is defined as constant = gammaln(Y + 1/alpha) - gammaln(Y + 1) - gammaln(1/alpha)

Previous topic

sm.genmod.families.family.NegativeBinomial.fitted

Next topic

sm.genmod.families.family.NegativeBinomial.predict

This Page