code: def __init__(self, *args, **kwds):
      super().__init__(*args, **kwds)
  
      # overwrite df_model and df_resid
      self.df_model = self.hatmatrix_trace() - 1  # assume constant
      self.df_resid = self.model.endog.shape[0] - self.df_model - 1
  
imports: from statsmodels.compat.python import lrange
  import numpy
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.regression.linear_model import OLS, GLS, RegressionResults
  from statsmodels.regression.feasible_gls import atleast_2dcols
label_desc: Use image node_id 1 to create a new TheilRegressionResults object from inherited base classes: RegressionResults with example: obj = TheilRegressionResults()