class_docstr: Analyses for a collection of 2x2 contingency tables.
  
  Such a collection may arise by stratifying a single 2x2 table with
  respect to another factor.  This class implements the
  'Cochran-Mantel-Haenszel' and 'Breslow-Day' procedures for
  analyzing collections of 2x2 contingency tables.
  
  Parameters
  ----------
  tables : list or ndarray
      Either a list containing several 2x2 contingency tables, or
      a 2x2xk ndarray in which each slice along the third axis is a
      2x2 contingency table.
  
  Notes
  -----
  This results are based on a sampling model in which the units are
  independent both within and between strata.
class_docstr_tok: ["Analyses","for","a","collection","of","2x2","contingency","tables",".","Such","a","collection","may","arise","by","stratifying","a","single","2x2","table","with","respect","to","another","factor",".","This","class","implements","the","'Cochran-Mantel-Haenszel","'","and","'Breslow-Day","'","procedures","for","analyzing","collections","of","2x2","contingency","tables",".","Parameters","--","--","--","--","--","tables",":","list","or","ndarray","Either","a","list","containing","several","2x2","contingency","tables",",","or","a","2x2xk","ndarray","in","which","each","slice","along","the","third","axis","is","a","2x2","contingency","table",".","Notes","--","--","-","This","results","are","based","on","a","sampling","model","in","which","the","units","are","independent","both","within","and","between","strata","."]
docstr: A summary of all the main results.
  
  Parameters
  ----------
  alpha : float
      `1 - alpha` is the nominal coverage probability of the
      confidence intervals.
  float_format : str
      Used for formatting numeric values in the summary.
  method : str
      The method for producing the confidence interval.  Currently
      must be 'normal' which uses the normal approximation.
docstr_tok: ["A","summary","of","all","the","main","results",".","Parameters","--","--","--","--","--","alpha",":","float","`","1","-","alpha","`","is","the","nominal","coverage","probability","of","the","confidence","intervals",".","float_format",":","str","Used","for","formatting","numeric","values","in","the","summary",".","method",":","str","The","method","for","producing","the","confidence","interval",".","Currently","must","be","'normal","'","which","uses","the","normal","approximation","."]
code: def summary(self, alpha=0.05, float_format="%.3f", method="normal"):
      """
      A summary of all the main results.
  
      Parameters
      ----------
      alpha : float
          `1 - alpha` is the nominal coverage probability of the
          confidence intervals.
      float_format : str
          Used for formatting numeric values in the summary.
      method : str
          The method for producing the confidence interval.  Currently
          must be 'normal' which uses the normal approximation.
      """
  
      def fmt(x):
          if isinstance(x, str):
              return x
          return float_format % x
  
      co_lcb, co_ucb = self.oddsratio_pooled_confint(
          alpha=alpha, method=method
      )
      clo_lcb, clo_ucb = self.logodds_pooled_confint(
          alpha=alpha, method=method
      )
      headers = ["Estimate", "LCB", "UCB"]
      stubs = [
          "Pooled odds",
          "Pooled log odds",
          "Pooled risk ratio",
          "",
      ]
      data = [
          [fmt(x) for x in [self.oddsratio_pooled, co_lcb, co_ucb]],
          [fmt(x) for x in [self.logodds_pooled, clo_lcb, clo_ucb]],
          [fmt(x) for x in [self.riskratio_pooled, "", ""]],
          ["", "", ""],
      ]
      tab1 = iolib.SimpleTable(
          data, headers, stubs, data_aligns="r", table_dec_above=""
      )
  
      headers = ["Statistic", "P-value", ""]
      stubs = ["Test of OR=1", "Test constant OR"]
      rslt1 = self.test_null_odds()
      rslt2 = self.test_equal_odds()
      data = [
          [fmt(x) for x in [rslt1.statistic, rslt1.pvalue, ""]],
          [fmt(x) for x in [rslt2.statistic, rslt2.pvalue, ""]],
      ]
      tab2 = iolib.SimpleTable(data, headers, stubs, data_aligns="r")
      tab1.extend(tab2)
  
      headers = ["", "", ""]
      stubs = ["Number of tables", "Min n", "Max n", "Avg n", "Total n"]
      ss = self.table.sum(0).sum(0)
      data = [
          ["%d" % self.table.shape[2], "", ""],
          ["%d" % min(ss), "", ""],
          ["%d" % max(ss), "", ""],
          ["%.0f" % np.mean(ss), "", ""],
          ["%d" % sum(ss), "", "", ""],
      ]
      tab3 = iolib.SimpleTable(data, headers, stubs, data_aligns="r")
      tab1.extend(tab3)
  
      return tab1
  
imports: import warnings
  import numpy
  import pandas
  from scipy import stats
  from statsmodels import iolib
  from statsmodels.tools import sm_exceptions
  from statsmodels.tools.decorators import cache_readonly
label_desc: Use image node_id 11 for calling the StratifiedTable obj's underlying member method code with example usage: obj.summary(alpha, float_format, method) and returns: tab1, unknown, x