title: Likelihood ratio test statsmodels
body: <p>In statsmodels ordinary least squares have likelihood ratio test implemented</p>
  
  <pre><code>OLSResults.compare_lr_test(restricted)
  </code></pre>
  
  <p>That is not true for the generalized linear model (GLM).
  I tried to implemtent copyng the OLS implementation:</p>
  
  <pre><code>from scipy import stats
  
  llf_full = results.llf
  llf_restr = results_res.llf
  df_full = results.df_resid 
  df_restr = results_res.df_resid 
  lrdf = (df_restr - df_full)
  lrstat = -2*(llf_restr - llf_full)
  lr_pvalue = stats.chi2.sf(lrstat, df=lrdf)
  lr_pvalue
  </code></pre>
  
  <p>it looks strightforward, but the fact that this is not implemented make me suspicious. Is this correct?</p>