'Evaluate the log-likelihood for a generalized linear model.'

def loglike(self, params, scale=None):

    lin_pred = (np.dot(self.exog, params) + self._offset_exposure)
    expval = self.family.link.inverse(lin_pred)
    if (scale is None):
        scale = self.estimate_scale(expval)
    llf = self.family.loglike(self.endog, expval, self.iweights, scale)
    return llf
