code: def printresults(sample, arg, bres, kind="bootstrap"):
      """calculate and print(Bootstrap or Monte Carlo result
  
      Parameters
      ----------
      sample : ndarray
          original sample data
      arg : float   (for general case will be array)
      bres : ndarray
          parameter estimates from Bootstrap or Monte Carlo run
      kind : {'bootstrap', 'montecarlo'}
          output is printed for Mootstrap (default) or Monte Carlo
  
      Returns
      -------
      None, currently only printing
  
      Notes
      -----
      still a bit a mess because it is used for both Bootstrap and Monte Carlo
  
      made correction:
          reference point for bootstrap is estimated parameter
  
      not clear:
          I'm not doing any ddof adjustment in estimation of variance, do we
          need ddof>0 ?
  
      todo: return results and string instead of printing
  
      """
      print("true parameter value")
      print(arg)
      print(
          "MLE estimate of parameters using sample (nobs=%d)" % (nobs)
      )
      argest = distr.fit_fr(sample, frozen=[np.nan, 0.0, 1.0])
      print(argest)
      if kind == "bootstrap":
          # bootstrap compares to estimate from sample
          argorig = arg
          arg = argest
  
      print(
          "%s distribution of parameter estimate (nrepl=%d)"
          % (kind, nrepl)
      )
      print(
          "mean = {:f}, bias={:f}".format(
              bres.mean(0), bres.mean(0) - arg
          )
      )
      print("median", np.median(bres, axis=0))
      print("var and std", bres.var(0), np.sqrt(bres.var(0)))
      bmse = ((bres - arg) ** 2).mean(0)
      print("mse, rmse", bmse, np.sqrt(bmse))
      bressorted = np.sort(bres)
      print("%s confidence interval (90%% coverage)" % kind)
      print(
          bressorted[np.floor(nrepl * 0.05)],
          bressorted[np.floor(nrepl * 0.95)],
      )
      print(
          "%s confidence interval (90%% coverage) normal approximation"
          % kind
      )
      print(
          stats.norm.ppf(0.05, loc=bres.mean(), scale=bres.std()),
      )
      print(stats.norm.isf(0.05, loc=bres.mean(), scale=bres.std()))
      print(
          "Kolmogorov-Smirnov test for normality of %s distribution"
          % kind
      )
      print(" - estimated parameters, p-values not really correct")
      print(stats.kstest(bres, "norm", (bres.mean(), bres.std())))
  
file_path: statsmodels/statsmodels/sandbox/distributions/sppatch.py
imports: from statsmodels.compat.python import lmap
  import numpy
  from scipy import stats, optimize, integrate
label_desc: Use image node_id 11 for calling a global function with example usage: printresults(sample, arg, bres, kind) without return types