class_docstr: Maximum Likelihood Estimation of Linear Model with t-distributed errors
  
  This is an example for generic MLE which has the same
  statistical model as discretemod.Poisson.
  
  Except for defining the negative log-likelihood method, all
  methods and results are generic. Gradients and Hessian
  and all resulting statistics are based on numerical
  differentiation.
class_docstr_tok: ["Maximum","Likelihood","Estimation","of","Linear","Model","with","t-distributed","errors","This","is","an","example","for","generic","MLE","which","has","the","same","statistical","model","as","discretemod.Poisson",".","Except","for","defining","the","negative","log-likelihood","method",",","all","methods","and","results","are","generic",".","Gradients","and","Hessian","and","all","resulting","statistics","are","based","on","numerical","differentiation","."]
docstr: 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]
docstr_tok: ["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","]"]
code: def nloglikeobs(self, params):
      """
      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]
      """
      # print len(params),
      store_params.append(params)
      if self.fixed_params is not None:
          # print 'using fixed'
          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
      # next part is stats.t._logpdf
      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)  # correction for scale
      return -lPx
  
file_path: statsmodels/statsmodels/examples/ex_generic_mle_tdist.py
imports: import numpy
  from scipy import stats, special, optimize
  import statsmodels.api
  from statsmodels.base.model import GenericLikelihoodModel
  from statsmodels.tools.numdiff import approx_hess
  import statsmodels.sandbox.distributions.sppatch
label_desc: Use image node_id 2 for calling the MyT obj's underlying member method code with example usage: obj.nloglikeobs(params) and returns: unknown