def loglike(self, params):
        offset = getattr(self, "offset", 0)
        exposure = getattr(self, "exposure", 0)
        XB = np.dot(self.exog, params) + offset + exposure
        endog = self.endog
        return np.sum(-np.exp(XB) +  endog*XB - gammaln(endog+1))
Loglikelihood of Poisson model
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/discrete/discrete_model.py/Poisson.loglike