code: def print_results(res):
      groupind = res.groups
      # res.fitjoint()  #not really necessary, because called by ftest_summary
      ft = res.ftest_summary()
      # print ft[0]  #skip because table is nicer
      print(
          "\nTable of F-tests for overall or pairwise equality of coefficients"
      )
      ##    print 'hypothesis F-statistic         p-value  df_denom df_num  reject'
      ##    for row in ft[1]:
      ##        print row,
      ##        if row[1][1]<0.05:
      ##            print '*'
      ##        else:
      ##            print ''
      from statsmodels.iolib import SimpleTable
  
      print(
          SimpleTable(
              [
                  (
                      ["{!r}".format(row[0])]
                      + list(row[1])
                      + ["*"] * (row[1][1] > 0.5).item()
                  )
                  for row in ft[1]
              ],
              headers=[
                  "pair",
                  "F-statistic",
                  "p-value",
                  "df_denom",
                  "df_num",
              ],
          )
      )
  
      print("Notes: p-values are not corrected for many tests")
      print("       (no Bonferroni correction)")
      print("       * : reject at 5% uncorrected confidence level")
      print("Null hypothesis: all or pairwise coefficient are the same")
      print("Alternative hypothesis: all coefficients are different")
  
      print("\nComparison with stats.f_oneway")
      print(stats.f_oneway(*[y[groupind == gr] for gr in res.unique]))
      print("\nLikelihood Ratio Test")
      print("likelihood ratio    p-value       df")
      print(res.lr_test())
      print(
          "Null model: pooled all coefficients are the same across groups,"
      )
      print(
          "Alternative model: all coefficients are allowed to be different"
      )
      print("not verified but looks close to f-test result")
  
      print(
          "\nOLS parameters by group from individual, separate ols regressions"
      )
      for group in sorted(res.olsbygroup):
          r = res.olsbygroup[group]
          print(group, r.params)
  
      print("\nCheck for heteroscedasticity, ")
      print(
          "variance and standard deviation for individual regressions"
      )
      print(
          " " * 12, " ".join("group %-10s" % (gr) for gr in res.unique)
      )
      print("variance    ", res.sigmabygroup)
      print("standard dev", np.sqrt(res.sigmabygroup))
  
imports: import numpy
  from scipy import stats
  import statsmodels.api
  from statsmodels.sandbox.regression.onewaygls import OneWayLS
label_desc: Use image node_id 1 for calling a global function with example usage: print_results(res) without return types