class_docstr: class for two sample comparison
  
  The tests and the confidence interval work for multi-endpoint comparison:
  If d1 and d2 have the same number of rows, then each column of the data
  in d1 is compared with the corresponding column in d2.
  
  Parameters
  ----------
  d1, d2 : instances of DescrStatsW
  
  Notes
  -----
  The result for the statistical tests and the confidence interval are
  independent of the user specified ddof.
  
  TODO: Extend to any number of groups or write a version that works in that
  case, like in SAS and SPSS.
docstr: summarize the results of the hypothesis test
  
  Parameters
  ----------
  use_t : bool, optional
      if use_t is True, then t test results are returned
      if use_t is False, then z test results are returned
  alpha : float
      significance level for the confidence interval, coverage is
      ``1-alpha``
  usevar : str, 'pooled' or 'unequal'
      If ``pooled``, then the standard deviation of the samples is
      assumed to be the same. If ``unequal``, then the variance of
      Welch ttest will be used, and the degrees of freedom are those
      of Satterthwaite if ``use_t`` is True.
  value : float
      difference between the means under the Null hypothesis.
  
  Returns
  -------
  smry : SimpleTable
docstr_tok: ["summarize","the","results","of","the","hypothesis","test","Parameters","--","--","--","--","--","use_t",":","bool",",","optional","if","use_t","is","True",",","then","t","test","results","are","returned","if","use_t","is","False",",","then","z","test","results","are","returned","alpha",":","float","significance","level","for","the","confidence","interval",",","coverage","is","``","1-alpha","``","usevar",":","str",",","'pooled","'","or","'unequal'","If","``","pooled","``",",","then","the","standard","deviation","of","the","samples","is","assumed","to","be","the","same",".","If","``","unequal","``",",","then","the","variance","of","Welch","ttest","will","be","used",",","and","the","degrees","of","freedom","are","those","of","Satterthwaite","if","``","use_t","``","is","True",".","value",":","float","difference","between","the","means","under","the","Null","hypothesis",".","Returns","--","--","--","-","smry",":","SimpleTable"]
code: def summary(self, use_t=True, alpha=0.05, usevar="pooled", value=0):
      """summarize the results of the hypothesis test
  
      Parameters
      ----------
      use_t : bool, optional
          if use_t is True, then t test results are returned
          if use_t is False, then z test results are returned
      alpha : float
          significance level for the confidence interval, coverage is
          ``1-alpha``
      usevar : str, 'pooled' or 'unequal'
          If ``pooled``, then the standard deviation of the samples is
          assumed to be the same. If ``unequal``, then the variance of
          Welch ttest will be used, and the degrees of freedom are those
          of Satterthwaite if ``use_t`` is True.
      value : float
          difference between the means under the Null hypothesis.
  
      Returns
      -------
      smry : SimpleTable
  
      """
  
      d1 = self.d1
      d2 = self.d2
  
      confint_percents = 100 - alpha * 100
  
      if use_t:
          tstat, pvalue, _ = self.ttest_ind(usevar=usevar, value=value)
          lower, upper = self.tconfint_diff(alpha=alpha, usevar=usevar)
      else:
          tstat, pvalue = self.ztest_ind(usevar=usevar, value=value)
          lower, upper = self.zconfint_diff(alpha=alpha, usevar=usevar)
  
      if usevar == "pooled":
          std_err = self.std_meandiff_pooledvar
      else:
          std_err = self.std_meandiff_separatevar
  
      std_err = np.atleast_1d(std_err)
      tstat = np.atleast_1d(tstat)
      pvalue = np.atleast_1d(pvalue)
      lower = np.atleast_1d(lower)
      upper = np.atleast_1d(upper)
      conf_int = np.column_stack((lower, upper))
      params = np.atleast_1d(d1.mean - d2.mean - value)
  
      title = "Test for equality of means"
      yname = "y"  # not used in params_frame
      xname = ["subset #%d" % (ii + 1) for ii in range(tstat.shape[0])]
  
      from statsmodels.iolib.summary import summary_params
  
      return summary_params(
          (None, params, std_err, tstat, pvalue, conf_int),
          alpha=alpha,
          use_t=use_t,
          yname=yname,
          xname=xname,
          title=title,
      )
  
imports: import numpy
  from scipy import stats
  from statsmodels.tools.decorators import cache_readonly
label_desc: Use image node_id 3 for calling the CompareMeans obj's underlying member method code with example usage: obj.summary(use_t, alpha, usevar, value) and returns: summary_params