'Loglikelihood of Poisson model
Parameters
params : array-like
The parameters of the model.
Returns
The log likelihood of the model evaluated at `params`
Notes
.. math:: \ln L=\sum_{i=1}^{n}\left[-\lambda_{i}+y_{i}x_{i}^{\prime}\beta-\ln y_{i}!\right]'

def nloglikeobs(self, params):

    store_params.append(params)
    if (not (self.fixed_params is None)):
        params = self.expandparams(params)
    beta = params[:(-2)]
    df = params[(-2)]
    scale = params[(-1)]
    loc = np.dot(self.exog, beta)
    endog = self.endog
    x = ((endog - loc) / scale)
    lPx = (sps_gamln(((df + 1) / 2)) - sps_gamln((df / 2.0)))
    lPx -= ((0.5 * np_log((df * np_pi))) + (((df + 1) / 2.0) * np_log((1 + ((x ** 2) / df)))))
    lPx -= np_log(scale)
    return (- lPx)
