code: def test_fitted(self):
      res1 = self.res1
      res2 = self.res2
  
      fittedvalues = res1.predict()
      resid = res1.model.endog - fittedvalues
      assert_allclose(
          fittedvalues, res2.loc_fit.fitted_values, rtol=0.00025
      )
      assert_allclose(resid, res2.loc_fit.residuals, atol=2e-6)
  
file_path: statsmodels/statsmodels/miscmodels/tests/test_tmodel.py
imports: import pytest
  import numpy
  from numpy.testing import assert_allclose
  from statsmodels.tools.tools import add_constant
  from statsmodels.tools.testing import Holder
  from statsmodels.miscmodels.tmodel import TLinearModel
label_desc: Use image node_id 3 for calling the CheckTLinearModelMixin obj's underlying member method code with example usage: obj.test_fitted() without return types