code: def test_df(self):
      res = self.res1
      k_extra = getattr(self, "k_extra", 0)
      nobs, k_vars = res.model.exog.shape
      assert res.df_resid == nobs - k_vars - k_extra
      assert res.df_model == k_vars - 1  # -1 for constant
      assert len(res.params) == k_vars + k_extra
  
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 5 for calling the CheckTLinearModelMixin obj's underlying member method code with example usage: obj.test_df() without return types