code: def test_glsar_arima(self):
      from statsmodels.tsa.arima.model import ARIMA
  
      endog = self.res.model.endog
      exog = self.res.model.exog
      mod1 = GLSAR(endog, exog, 3)
      res = mod1.iterative_fit(10)
      mod_arma = ARIMA(endog, order=(3, 0, 0), exog=exog[:, :-1])
      res_arma = mod_arma.fit()
      assert_allclose(
          res.params, res_arma.params[[1, 2, 0]], atol=0.01, rtol=1e-2
      )
      assert_allclose(
          res.model.rho, res_arma.params[3:6], atol=0.05, rtol=1e-3
      )
      assert_allclose(
          res.bse, res_arma.bse[[1, 2, 0]], atol=0.1, rtol=1e-3
      )
  
      assert_equal(len(res.history["params"]), 5)
      # this should be identical, history has last fit
      assert_equal(res.history["params"][-1], res.params)
  
      res2 = mod1.iterative_fit(4, rtol=0)
      assert_equal(len(res2.history["params"]), 4)
      assert_equal(len(res2.history["rho"]), 4)
  
file_path: statsmodels/statsmodels/regression/tests/test_glsar_stata.py
imports: import numpy
  from numpy.testing import assert_almost_equal, assert_allclose, assert_equal
  from statsmodels.regression.linear_model import GLSAR
  from statsmodels.tools.tools import add_constant
  from statsmodels.datasets import macrodata
label_desc: Use image node_id 3 for calling the TestGLSARCorc obj's underlying member method code with example usage: obj.test_glsar_arima() without return types