The loglikelihood function for the negative binomial family.
Parameters : | Y : array-like
fittedvalues : array-like
|
---|---|
Returns : | llf : float
|
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)