code: def __init__(self, method="mle"):
      self.df_model = 3
      self.k = 5
      self.k_ar = 1
      self.k_ma = 2
      self.k_exog = 1
      self.k_diff = 1
      if method == "mle":
          from .arima112_results import results
  
          # from gretl
          self.arroots = [1.0324 + 0j]
          self.maroots = [1.1447 + 0j, -4.8613 + 0j]
          self.hqic = 495.5852
          self.aic_gretl = 488.8925
          self.bic_gretl = 505.4338
          self.tvalues = [3.454, 31.10, -7.994, -2.127]
          self.pvalues = [0.0006, 2.1e-212, 1.31e-15, 0.0334]
          cov_params = np.array(
              [
                  [0.0620096, -0.00172172, 0.00181301, 0.00103271],
                  [0, 9.69682e-04, -9.70767e-04, -8.99814e-04],
                  [0, 0, 0.00698068, -0.00443871],
                  [0, 0, 0, 0.00713662],
              ]
          )
          self.cov_params = (
              cov_params + cov_params.T - np.diag(np.diag(cov_params))
          )
          self.bse = np.sqrt(np.diag(self.cov_params))
  
          # from gretl
          self.forecast = forecast_results["fc112c"][-25:]
          self.forecasterr = forecast_results["fc112cse"][-25:]
          self.forecast_dyn = forecast_results["fc112cdyn"]
          self.forecasterr_dyn = forecast_results["fc112cdynse"]
  
          # unpack stata results
          self.__dict__ = results
          self.resid = self.resid[1:]
          self.params = self.params[:-1]
          self.sigma2 = self.sigma**2
          self.aic = self.icstats[4]
          self.bic = self.icstats[5]
          self.fittedvalues = self.xb[
              1:
          ]  # no idea why this initial value
          self.linear = self.y[1:]
          # stata bse are OPG
          # self.bse = np.diag(self.cov_params) ** .5
      else:
          # NOTE: this looks like a "hard" problem
          #  unable to replicate stata's results even with their starting
          #   values
          # unable to replicate x12 results in stata using their starting
          #   values. x-12 has better likelihood and we can replicate so
          #   use their results
  
          # taken from R using X12-arima values as init params
          self.bse = [0.07727588, 0.09356658, 0.10503567, 0.07727970]
          self.params = [0.9053219, -0.692412, 1.0736728, 0.1720008]
          self.sigma2 = 0.6820727
          self.tvalues = [11.715452, -7.400215, 10.221983, 2.225692]
          self.pvalues = [0, 3.791634e-12, 0, 2.716275e-02]
          self.cov_params = np.array(
              [
                  [
                      0.0059715623,
                      0.001327824,
                      -0.001592129,
                      -0.0008061933,
                  ],
                  [
                      0.0013278238,
                      0.008754705,
                      -0.008024634,
                      -0.0045933413,
                  ],
                  [
                      -0.0015921293,
                      -0.008024634,
                      0.011032492,
                      0.0072509641,
                  ],
                  [
                      -0.0008061933,
                      -0.004593341,
                      0.007250964,
                      0.0059721516,
                  ],
              ]
          )
  
          # from x12arima via gretl
          # gretl did not converge for this model...
          self.llf = -246.7534
          self.nobs = 202
          # self.params = [.905322, -.692425, 1.07366, 0.172024]
          # self.sigma2 = 0.682072819129
          # self.bse = [0.0756430, 0.118440, 0.140691, 0.105266]
  
          self.resid = [
              -1.214477,
              -0.069772,
              -1.064510,
              -0.249555,
              -0.874206,
              -0.322177,
              -1.003579,
              -0.310040,
              -0.890506,
              -0.421211,
              -0.715219,
              -0.564119,
              -0.636560,
              -0.580912,
              -0.717440,
              -0.424277,
              -0.747835,
              -0.424739,
              -0.805958,
              -0.516877,
              -0.690127,
              -0.473072,
              -0.694766,
              -0.435627,
              -0.736474,
              -0.388060,
              -0.429596,
              -0.557224,
              -0.342308,
              -0.741842,
              -0.442199,
              -0.491319,
              -0.420884,
              -0.388057,
              -0.466176,
              -0.257193,
              -0.429646,
              -0.349683,
              -0.205870,
              -0.335547,
              -0.290300,
              -0.216572,
              -0.234272,
              -0.427951,
              -0.255446,
              -0.338097,
              -0.579033,
              -0.213860,
              -0.556756,
              -0.389907,
              -0.510060,
              -0.409759,
              -0.396778,
              -0.258727,
              0.160063,
              -0.467109,
              0.688004,
              -0.021120,
              0.503044,
              0.031500,
              0.878365,
              -0.003548,
              -0.079327,
              0.038289,
              0.032773,
              -0.050780,
              -0.560124,
              0.185655,
              -0.111981,
              -0.020714,
              0.363254,
              -0.218484,
              -0.006161,
              0.165950,
              0.252365,
              0.599220,
              0.488921,
              0.347677,
              1.079814,
              1.102745,
              0.959907,
              1.570836,
              1.454934,
              0.343521,
              1.125826,
              1.154059,
              0.666141,
              1.269685,
              0.551831,
              -0.027476,
              -0.305192,
              1.715665,
              -0.990662,
              -0.548239,
              -0.011636,
              0.197796,
              -0.050128,
              0.480031,
              0.061198,
              -0.049562,
              0.064436,
              -0.300420,
              0.494730,
              -0.411527,
              0.109242,
              0.375255,
              -2.184482,
              0.717733,
              -0.673064,
              0.751681,
              -0.092543,
              0.438016,
              -0.024881,
              0.250085,
              0.096010,
              0.452618,
              0.265491,
              0.374299,
              0.820424,
              0.238176,
              -0.059646,
              1.214061,
              0.028679,
              0.797567,
              1.614444,
              -0.094717,
              -0.408067,
              0.299198,
              -0.021561,
              0.231915,
              0.084190,
              0.199192,
              0.201132,
              0.148509,
              0.035431,
              -0.203352,
              0.264744,
              -0.319785,
              0.150305,
              0.184628,
              0.074637,
              0.148340,
              0.357372,
              -0.241250,
              0.119294,
              0.204413,
              0.458730,
              -0.190477,
              0.416587,
              0.084216,
              -0.363361,
              -0.310339,
              0.309728,
              -0.549677,
              -0.449092,
              0.183025,
              -0.259015,
              -0.000883,
              0.267255,
              -0.188068,
              0.577697,
              0.049310,
              0.746401,
              0.565829,
              0.178270,
              0.709983,
              -0.348012,
              0.273262,
              -0.873288,
              -0.403100,
              0.720072,
              -0.428076,
              0.488246,
              0.248152,
              -0.313214,
              -0.323137,
              0.414843,
              0.308909,
              0.134180,
              0.732275,
              0.535639,
              -0.056128,
              1.128355,
              -0.449151,
              3.879123,
              -2.303860,
              1.712549,
              -0.074407,
              -1.162052,
              0.848316,
              1.262031,
              0.009320,
              1.017563,
              1.978597,
              -0.001637,
              3.782223,
              -4.119563,
              -3.666488,
              0.345244,
              0.869998,
              0.635321,
          ]
  
          self.linear = [
              30.5645,
              29.4398,
              30.6045,
              29.7996,
              30.6242,
              30.1622,
              30.8136,
              30.2300,
              30.8705,
              30.4612,
              30.9252,
              30.7841,
              31.0166,
              31.0209,
              31.1974,
              31.1143,
              31.4978,
              31.3647,
              31.7560,
              31.5369,
              31.8101,
              31.7531,
              32.0748,
              32.0156,
              32.3865,
              32.2681,
              32.7096,
              33.0072,
              33.1923,
              33.6418,
              33.5422,
              33.8913,
              34.1209,
              34.4881,
              34.8662,
              35.1572,
              35.7296,
              36.0497,
              36.5059,
              37.1355,
              37.5903,
              38.1166,
              38.7343,
              39.3280,
              39.6554,
              40.2381,
              40.6790,
              40.8139,
              41.4568,
              41.5899,
              42.0101,
              42.2098,
              42.5968,
              42.9587,
              43.5399,
              44.6671,
              44.9120,
              46.8211,
              47.5970,
              49.2685,
              50.1216,
              52.3035,
              53.0793,
              53.9617,
              54.8672,
              55.8508,
              56.6601,
              56.8143,
              58.0120,
              58.7207,
              59.6367,
              61.0185,
              61.6062,
              62.5340,
              63.6476,
              64.9008,
              66.6111,
              68.1523,
              69.5202,
              71.8973,
              74.2401,
              76.4292,
              79.4451,
              82.2565,
              83.5742,
              86.0459,
              88.4339,
              90.2303,
              92.8482,
              94.4275,
              95.3052,
              95.7843,
              99.0907,
              98.4482,
              98.8116,
              99.6022,
              100.8501,
              101.6200,
              103.2388,
              104.1496,
              105.0356,
              106.0004,
              106.5053,
              108.1115,
              108.3908,
              109.5247,
              110.8845,
              108.7823,
              110.8731,
              110.6483,
              112.7925,
              113.3620,
              115.0249,
              115.7499,
              117.1040,
              118.0474,
              119.6345,
              120.8257,
              122.2796,
              124.2618,
              125.4596,
              126.2859,
              128.8713,
              129.7024,
              131.7856,
              134.7947,
              135.5081,
              135.9008,
              137.2216,
              138.0681,
              139.3158,
              140.3008,
              141.4989,
              142.6515,
              143.7646,
              144.7034,
              145.3353,
              146.6198,
              147.0497,
              148.2154,
              149.3254,
              150.3517,
              151.4426,
              152.8413,
              153.3807,
              154.4956,
              155.6413,
              157.1905,
              157.7834,
              159.3158,
              160.2634,
              160.7103,
              161.1903,
              162.5497,
              162.6491,
              163.0170,
              164.1590,
              164.7009,
              165.6327,
              166.8881,
              167.5223,
              169.2507,
              170.1536,
              172.1342,
              173.7217,
              174.8900,
              176.7480,
              177.1267,
              178.4733,
              178.1031,
              178.5799,
              180.4281,
              180.7118,
              182.3518,
              183.5132,
              184.0231,
              184.4852,
              185.9911,
              187.2658,
              188.3677,
              190.2644,
              191.8561,
              192.6716,
              195.1492,
              195.3209,
              201.7039,
              198.9875,
              202.7744,
              203.0621,
              202.7257,
              204.6580,
              207.3287,
              208.1154,
              210.5164,
              213.9986,
              214.8278,
              221.0086,
              215.8405,
              212.3258,
              213.5990,
              215.7497,
          ]
  
          self.yr = []
  
          self.arroots = [-1.4442 + 0j]
          self.maroots = [-1.1394 + 0j, -5.1019 + 0j]
          self.hqic = 510.1902
          self.aic = 503.5069
          self.bic = 520.0234
          # TODO: Document source for these non-used results
          #  (and why they are not used)
          # self.tvalues = [11.97, -5.846, 7.631, 1.634]
          # self.pvalues = [5.21e-33, 5.03e-9, 2.32e-14, .1022]
          # cov_params = np.array([
          #         [0.0620096, -0.00172172, 0.00181301, 0.00103271],
          #         [0, 9.69682e-04, -9.70767e-04, -8.99814e-04],
          #         [0, 0, 0.00698068, -0.00443871],
          #         [0, 0, 0, 0.00713662]])
          # self.cov_params = cov_params + cov_params.T - \
          #                np.diag(np.diag(cov_params))
          # self.bse = np.sqrt(np.diag(self.cov_params))
          self.forecast = forecast_results["fc112c_css"][-25:]
          self.forecasterr = forecast_results["fc112cse_css"][-25:]
          self.forecast_dyn = forecast_results["fc112cdyn_css"]
          self.forecasterr_dyn = forecast_results["fc112cdynse_css"]
  
file_path: statsmodels/statsmodels/tsa/tests/results/results_arima.py
imports: import os
  import numpy
  from numpy import genfromtxt
label_desc: Use image node_id 1 to create a new ARIMA112 object  with example: obj = ARIMA112(method)