'The log-likelihood function in terms of the fitted mean response.
Parameters
endog : array-like
Endogenous response variable
mu : array-like
Fitted mean response variable
iweights : array-like
1d array of weights. The default is 1.
scale : float, optional
Not used for in the Poisson loglike.
Returns
llf : float
The value of the loglikelihood function evaluated at
(endog,mu,iweights,scale) as defined below.
Notes
.. math::
llf = scale * \sum_i iweights_i * (Y_i * \log(\mu_i) - \mu_i -
\ln \Gamma(Y_i + 1))'

def loglike(self, endog, mu, iweights=1.0, scale=1.0):

    return np.sum((iweights * (((endog * np.log(mu)) - mu) - special.gammaln((endog + 1)))))
