class_docstr: Class to contain results of fitting a Cox proportional hazards
  survival model.
  
  PHregResults inherits from statsmodels.LikelihoodModelResults
  
  Parameters
  ----------
  See statsmodels.LikelihoodModelResults
  
  Attributes
  ----------
  model : class instance
      PHreg model instance that called fit.
  normalized_cov_params : ndarray
      The sampling covariance matrix of the estimates
  params : ndarray
      The coefficients of the fitted model.  Each coefficient is the
      log hazard ratio corresponding to a 1 unit difference in a
      single covariate while holding the other covariates fixed.
  bse : ndarray
      The standard errors of the fitted parameters.
  
  See Also
  --------
  statsmodels.LikelihoodModelResults
class_docstr_tok: ["Class","to","contain","results","of","fitting","a","Cox","proportional","hazards","survival","model",".","PHregResults","inherits","from","statsmodels.LikelihoodModelResults","Parameters","--","--","--","--","--","See","statsmodels.LikelihoodModelResults","Attributes","--","--","--","--","--","model",":","class","instance","PHreg","model","instance","that","called","fit",".","normalized_cov_params",":","ndarray","The","sampling","covariance","matrix","of","the","estimates","params",":","ndarray","The","coefficients","of","the","fitted","model",".","Each","coefficient","is","the","log","hazard","ratio","corresponding","to","a","1","unit","difference","in","a","single","covariate","while","holding","the","other","covariates","fixed",".","bse",":","ndarray","The","standard","errors","of","the","fitted","parameters",".","See","Also","--","--","--","--","statsmodels.LikelihoodModelResults"]
docstr: Summarize the proportional hazards regression results.
  
  Parameters
  ----------
  yname : str, optional
      Default is `y`
  xname : list[str], optional
      Names for the exogenous variables, default is `x#` for ## in p the
      number of regressors. Must match the number of parameters in
      the model
  title : str, optional
      Title for the top table. If not None, then this replaces
      the default title
  alpha : float
      significance level for the confidence intervals
  
  Returns
  -------
  smry : Summary instance
      this holds the summary tables and text, which can be
      printed or converted to various output formats.
  
  See Also
  --------
  statsmodels.iolib.summary2.Summary : class to hold summary results
docstr_tok: ["Summarize","the","proportional","hazards","regression","results",".","Parameters","--","--","--","--","--","yname",":","str",",","optional","Default","is","`","y","`","xname",":","list","[","str","]",",","optional","Names","for","the","exogenous","variables",",","default","is","`","x","#","`","for","#","#","in","p","the","number","of","regressors",".","Must","match","the","number","of","parameters","in","the","model","title",":","str",",","optional","Title","for","the","top","table",".","If","not","None",",","then","this","replaces","the","default","title","alpha",":","float","significance","level","for","the","confidence","intervals","Returns","--","--","--","-","smry",":","Summary","instance","this","holds","the","summary","tables","and","text",",","which","can","be","printed","or","converted","to","various","output","formats",".","See","Also","--","--","--","--","statsmodels.iolib.summary2.Summary",":","class","to","hold","summary","results"]
code: def summary(self, yname=None, xname=None, title=None, alpha=0.05):
      """
      Summarize the proportional hazards regression results.
  
      Parameters
      ----------
      yname : str, optional
          Default is `y`
      xname : list[str], optional
          Names for the exogenous variables, default is `x#` for ## in p the
          number of regressors. Must match the number of parameters in
          the model
      title : str, optional
          Title for the top table. If not None, then this replaces
          the default title
      alpha : float
          significance level for the confidence intervals
  
      Returns
      -------
      smry : Summary instance
          this holds the summary tables and text, which can be
          printed or converted to various output formats.
  
      See Also
      --------
      statsmodels.iolib.summary2.Summary : class to hold summary results
      """
  
      from statsmodels.iolib import summary2
  
      smry = summary2.Summary()
      float_format = "%8.3f"
  
      info = {}
      info["Model:"] = "PH Reg"
      if yname is None:
          yname = self.model.endog_names
      info["Dependent variable:"] = yname
      info["Ties:"] = self.model.ties.capitalize()
      info["Sample size:"] = str(self.model.surv.n_obs)
      info["Num. events:"] = str(int(sum(self.model.status)))
  
      if self.model.groups is not None:
          mn, mx, avg, num = self._group_stats(self.model.groups)
          info["Num groups:"] = "%.0f" % num
          info["Min group size:"] = "%.0f" % mn
          info["Max group size:"] = "%.0f" % mx
          info["Avg group size:"] = "%.1f" % avg
  
      if self.model.strata is not None:
          mn, mx, avg, num = self._group_stats(self.model.strata)
          info["Num strata:"] = "%.0f" % num
          info["Min stratum size:"] = "%.0f" % mn
          info["Max stratum size:"] = "%.0f" % mx
          info["Avg stratum size:"] = "%.1f" % avg
  
      smry.add_dict(info, align="l", float_format=float_format)
  
      param = summary2.summary_params(self, alpha=alpha)
      param = param.rename(
          columns={"Coef.": "log HR", "Std.Err.": "log HR SE"}
      )
      param.insert(2, "HR", np.exp(param["log HR"]))
      a = "[%.3f" % (alpha / 2)
      param.loc[:, a] = np.exp(param.loc[:, a])
      a = "%.3f]" % (1 - alpha / 2)
      param.loc[:, a] = np.exp(param.loc[:, a])
      if xname is not None:
          param.index = xname
      smry.add_df(param, float_format=float_format)
      smry.add_title(title=title, results=self)
      smry.add_text("Confidence intervals are for the hazard ratios")
  
      dstrat = self.model.surv.nstrat_orig - self.model.surv.nstrat
      if dstrat > 0:
          if dstrat == 1:
              smry.add_text("1 stratum dropped for having no events")
          else:
              smry.add_text(
                  "%d strata dropped for having no events" % dstrat
              )
  
      if self.model.entry is not None:
          n_entry = sum(self.model.entry != 0)
          if n_entry == 1:
              smry.add_text("1 observation has a positive entry time")
          else:
              smry.add_text(
                  "%d observations have positive entry times" % n_entry
              )
  
      if self.model.groups is not None:
          smry.add_text(
              "Standard errors account for dependence within groups"
          )
  
      if hasattr(self, "regularized"):
          smry.add_text(
              "Standard errors do not account for the regularization"
          )
  
      return smry
  
imports: import numpy
  from statsmodels.base import model
  import statsmodels.base.model
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.compat.pandas import Appender
label_desc: Use image node_id 13 for calling the PHRegResults obj's underlying member method code with example usage: obj.summary(yname, xname, title, alpha) and returns: smry