def summary(self, yname=None, xname=None, title=None, alpha=.05):
        """
        Summarize the proportional hazards regression results.

        Parameters
        -----------
        yname : string, optional
            Default is `y`
        xname : list of strings, optional
            Default is `x#` for ## in p the number of regressors
        title : string, 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.summary.Summary : class to hold summary
            results
        """

        from statsmodels.iolib import summary2
        from statsmodels.compat.collections import OrderedDict
        smry = summary2.Summary()
        float_format = "%8.3f"

        info = OrderedDict()
        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 = (alpha / 2) % "[%.3f"
        param.loc[:, a] = np.exp(param.loc[:, a])
        a = "%.3f]" % (1 - alpha / 2)
        param.loc[:, a] = np.exp(param.loc[:, a])
        if xname != 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
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/duration/hazard_regression.py/PHRegResults.summary/swapped operands of `%`