class_docstr: Results obtained from Stata 11
class_docstr_tok: ["Results","obtained","from","Stata","11"]
code: def negativebinomial_nb1_bfgs():
      # Unpublished implementation intended for R's COUNT package. Sent by
      # J.Hilbe (of Cambridge UP NBin book) and Andrew Robinson to Vincent
      # Arel-Bundock on 2012-12-06.
  
      # TODO: Does the from Stata comment below apply to the
      #  commented-out obj.params here or to everything below?  If the
      #  latter, then where do the commented-out version come from?
      # obj.params = [-0.065309744899923, -0.296016207412261,
      #        0.0411724098925173, -0.0320460533573259, 0.19083354227553,
      #        0.0318566232844115, -0.0331972813313092, -0.0484691550721231,
      #        0.111971860837541, 0.757560143822609,
      #        3.73086958562569]
      # from Stata
      obj = Namespace()
      obj.nobs = 20190
      obj.params = [
          -0.065317260803762961,
          -0.296023807893893376,
          0.041187021258044826,
          -0.032028789543547605,
          0.19065933246421754,
          0.031871625115758778,
          -0.033250849053302826,
          -0.04850769174426571,
          0.111813637465757343,
          0.757277086555503409,
          3.731151380800305,
      ]
      # lnalpha and lnalpha_std_err are from stata
      obj.lnalpha = 1.316716867203
      obj.lnalpha_std_err = 0.0168876692
      obj.bse = [
          0.00536019929563678,
          0.0196998350459769,
          0.00335779098766272,
          0.00301145915122889,
          0.0237984097096245,
          0.00107360844112751,
          0.0167174614755359,
          0.0298037989274781,
          0.0546838603596457,
          0.0214703279904911,
          0.0630011409376052,
      ]
      obj.z = [
          -12.1842008660173,
          -15.0263292419148,
          12.2617548393554,
          -10.6413707601675,
          8.0187518663633,
          29.6724784046551,
          -1.98578482623631,
          -1.62627439508848,
          2.04762173155154,
          35.2840508145997,
          # From R, this is alpha/bse(alpha)
          59.2190796881069
          # taken from Stata even though they do not report it
          # lnalpha/bse(lnalpha)
          # 77.968995
      ]
  
      obj.conf_int = [
          [-0.075815736, -0.0548037543],
          [-0.334627884, -0.2574045307],
          [0.034591140, 0.0477536802],
          [-0.037948513, -0.0261435934],
          [0.144188659, 0.2374784253],
          [0.029752351, 0.0339608958],
          [-0.065963506, -0.0004310568],
          [-0.106884601, 0.0099462908],
          [0.004791495, 0.2191522271],
          [3.607387349, 3.8543518219],
          [0.715478301, 0.7996419867],
      ]
      # from Stata
      obj.llf = -43278.75612911823
      obj.llnull = -44199.2744356343
      obj.llr = 1841.036613032149
      obj.aic = 86579.51225823645655
      obj.bic = 86666.55462806082505
      obj.llr_pvalue = 0.0
      obj.df_model = 9.0
      obj.df_resid = 20180.0
      # Smoke tests TODO: check against other stats package
      obj.pvalues = [
          3.65557865e-034,
          5.24431864e-051,
          1.42921171e-034,
          2.09797259e-026,
          1.15949461e-015,
          1.56785415e-193,
          4.71746349e-002,
          1.04731854e-001,
          4.07534831e-002,
          1.95504975e-272,
          0.00000000e000,
      ]
      obj.conf_int = [
          [-0.0758236, -0.054811],
          [-0.3346363, -0.2574113],
          [0.0346053, 0.0477687],
          [-0.0379314, -0.0261261],
          [0.1440119, 0.2373067],
          [0.0297667, 0.0339766],
          [-0.0660178, -0.0004839],
          [-0.1069241, 0.0099087],
          [0.0046266, 0.2190007],
          [0.7151889, 0.7993652],
          # from stata for alpha no lnalpha
          [3.609675, 3.856716],
      ]
      #   [1.28360034e+00,   1.34979803e+00]]
      obj.fittedvalues = [
          0.8487497,
          0.8487497,
          0.8487497,
          0.8487497,
          0.8487497,
          0.88201746,
          0.88201746,
          0.88201746,
          0.88201746,
          0.88201746,
      ]
      return obj
  
imports: import os
  import numpy
label_desc: Use image node_id 4 for calling the RandHIE obj's underlying member method code with example usage: obj.negativebinomial_nb1_bfgs() and returns: obj