class_docstr: Todo:
  check treatment of const, make it optional ?
      add hasconst (0 or 1), needed when selecting nfact+hasconst
  options are arguments in calc_factors, should be more public instead
  cross-validation is slow for large number of observations
docstr: provides a summary for the selection of the number of factors
  
  Returns
  -------
  sumstr : str
      summary of the results for selecting the number of factors
code: def summary_find_nfact(self):
      """provides a summary for the selection of the number of factors
  
      Returns
      -------
      sumstr : str
          summary of the results for selecting the number of factors
  
      """
      if not hasattr(self, "results_find_nfact"):
          self.fit_find_nfact()
  
      results = self.results_find_nfact
      sumstr = ""
      sumstr += "\n" + "Best result for k, by AIC, BIC, R2_adj, L1O"
      #        best = np.r_[(np.argmin(results[:,1:3],0), np.argmax(results[:,3],0),
      #                     np.argmin(results[:,-1],0))]
  
      sumstr += (
          "\n" + " " * 19 + "%5d %4d %6d %5d" % tuple(self.best_nfact)
      )
  
      from statsmodels.iolib.table import SimpleTable
  
      headers = "k, AIC, BIC, R2_adj, L1O".split(", ")
      numformat = ["%6d"] + ["%10.3f"] * 4  #'%10.4f'
      txt_fmt1 = dict(data_fmts=numformat)
      tabl = SimpleTable(results, headers, None, txt_fmt=txt_fmt1)
  
      sumstr += "\n" + "PCA regression on simulated data,"
      sumstr += "\n" + "DGP: 2 factors and 4 explanatory variables"
      sumstr += "\n" + tabl.__str__()
      sumstr += "\n" + "Notes: k is number of components of PCA,"
      sumstr += "\n" + "       constant is added additionally"
      sumstr += "\n" + "       k=0 means regression on constant only"
      sumstr += (
          "\n"
          + "       L1O: sum of squared prediction errors for leave-one-out"
      )
      return sumstr
  
file_path: statsmodels/statsmodels/sandbox/datarich/factormodels.py
imports: import numpy
  import statsmodels.api
  from statsmodels.sandbox.tools import pca
  from statsmodels.sandbox.tools.cross_val import LeaveOneOut
label_desc: Use image node_id 5 for calling the FactorModelUnivariate obj's underlying member method code with example usage: obj.summary_find_nfact() and returns: sumstr