code: def anovadict(res):
      """update regression results dictionary with ANOVA specific statistics
  
      not checked for completeness
      """
      ad = {}
      ad.update(
          res.__dict__
      )  # dict does not work with cached attributes
      anova_attr = [
          "df_model",
          "df_resid",
          "ess",
          "ssr",
          "uncentered_tss",
          "mse_model",
          "mse_resid",
          "mse_total",
          "fvalue",
          "f_pvalue",
          "rsquared",
      ]
      for key in anova_attr:
          ad[key] = getattr(res, key)
      ad["nobs"] = res.model.nobs
      ad["ssmwithmean"] = res.uncentered_tss - res.ssr
      return ad
  
file_path: statsmodels/statsmodels/sandbox/regression/try_ols_anova.py
imports: from statsmodels.compat.python import lmap
  import numpy
  import statsmodels.api
label_desc: Use image node_id 4 for calling a global function with example usage: anovadict(res) and returns: ad