class_docstr: Longley used for TestGlmGaussian
  
  Results are from Stata and R.
class_docstr_tok: ["Longley","used","for","TestGlmGaussian","Results","are","from","Stata","and","R","."]
code: def __init__(self):
      self.resids = np.array(
          [
              [
                  267.34002976,
                  267.34002976,
                  267.34002976,
                  267.34002976,
                  267.34002976,
              ],
              [
                  -94.0139424,
                  -94.0139424,
                  -94.0139424,
                  -94.0139424,
                  -94.0139424,
              ],
              [
                  46.28716776,
                  46.28716776,
                  46.28716776,
                  46.28716776,
                  46.28716776,
              ],
              [
                  -410.11462193,
                  -410.11462193,
                  -410.11462193,
                  -410.11462193,
                  -410.11462193,
              ],
              [
                  309.71459076,
                  309.71459076,
                  309.71459076,
                  309.71459076,
                  309.71459076,
              ],
              [
                  -249.31121533,
                  -249.31121533,
                  -249.31121533,
                  -249.31121533,
                  -249.31121533,
              ],
              [
                  -164.0489564,
                  -164.0489564,
                  -164.0489564,
                  -164.0489564,
                  -164.0489564,
              ],
              [
                  -13.18035687,
                  -13.18035687,
                  -13.18035687,
                  -13.18035687,
                  -13.18035687,
              ],
              [
                  14.3047726,
                  14.3047726,
                  14.3047726,
                  14.3047726,
                  14.3047726,
              ],
              [
                  455.39409455,
                  455.39409455,
                  455.39409455,
                  455.39409455,
                  455.39409455,
              ],
              [
                  -17.26892711,
                  -17.26892711,
                  -17.26892711,
                  -17.26892711,
                  -17.26892711,
              ],
              [
                  -39.05504252,
                  -39.05504252,
                  -39.05504252,
                  -39.05504252,
                  -39.05504252,
              ],
              [
                  -155.5499736,
                  -155.5499736,
                  -155.5499736,
                  -155.5499736,
                  -155.5499736,
              ],
              [
                  -85.67130804,
                  -85.67130804,
                  -85.67130804,
                  -85.67130804,
                  -85.67130804,
              ],
              [
                  341.93151396,
                  341.93151396,
                  341.93151396,
                  341.93151396,
                  341.93151396,
              ],
              [
                  -206.75782519,
                  -206.75782519,
                  -206.75782519,
                  -206.75782519,
                  -206.75782519,
              ],
          ]
      )
      self.null_deviance = 185008826  # taken from R.
      self.params = np.array(
          [
              1.50618723e01,
              -3.58191793e-02,
              -2.02022980e00,
              -1.03322687e00,
              -5.11041057e-02,
              1.82915146e03,
              -3.48225863e06,
          ]
      )
      self.bse = np.array(
          [
              8.49149258e01,
              3.34910078e-02,
              4.88399682e-01,
              2.14274163e-01,
              2.26073200e-01,
              4.55478499e02,
              8.90420384e05,
          ]
      )
      self.aic_R = 235.23486961695903  # R adds 2 for dof to AIC
      self.aic_Stata = 14.57717943930524  # stata divides by nobs
      self.deviance = 836424.0555058046  # from R
      self.scale = 92936.006167311629
      self.llf = -109.61743480847952
      self.null_deviance = 185008826  # taken from R. Rpy bug
  
      self.bic_Stata = 836399.1760177979  # no bic in R?
      self.df_model = 6
      self.df_resid = 9
  
      # TODO: taken from Stata; not available in sm yet
      self.chi2 = 1981.711859508729
  
      self.prsquared = 0.90
      self.prsquared_cox_snell = 1.00
  
      # self.pearson_chi2 = 836424.1293162981   # from Stata (?)
      self.fittedvalues = np.array(
          [
              60055.659970240202,
              61216.013942398131,
              60124.71283224225,
              61597.114621930756,
              62911.285409240052,
              63888.31121532945,
              65153.048956395127,
              63774.180356866214,
              66004.695227399934,
              67401.605905447621,
              68186.268927114084,
              66552.055042522494,
              68810.549973595422,
              69649.67130804155,
              68989.068486039061,
              70757.757825193927,
          ]
      )
  
imports: import os
  import numpy
  import pandas
  from statsmodels.api import add_constant
  from statsmodels.genmod.tests.results import glm_test_resids
label_desc: Use image node_id 1 to create a new Longley object  with example: obj = Longley()