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: ttest for the null hypothesis of identical means
  
  this should also be the same as onewaygls, except for ddof differences
  
  Parameters
  ----------
  x1 : array_like, 1-D or 2-D
      first of the two independent samples, see notes for 2-D case
  x2 : array_like, 1-D or 2-D
      second of the two independent samples, see notes for 2-D case
  alternative : str
      The alternative hypothesis, H1, has to be one of the following
      'two-sided': H1: difference in means not equal to value (default)
      'larger' :   H1: difference in means larger than value
      'smaller' :  H1: difference in means smaller than value
  
  usevar : str, 'pooled' or 'unequal'
      If ``pooled``, then the standard deviation of the samples is assumed to be
      the same. If ``unequal``, then Welch ttest with Satterthwait degrees
      of freedom is used
  value : float
      difference between the means under the Null hypothesis.
  
  
  Returns
  -------
  tstat : float
      test statistic
  pvalue : float
      pvalue of the t-test
  df : int or float
      degrees of freedom used in the t-test
  
  Notes
  -----
  The result is independent of the user specified ddof.
docstr_tok: ["ttest","for","the","null","hypothesis","of","identical","means","this","should","also","be","the","same","as","onewaygls",",","except","for","ddof","differences","Parameters","--","--","--","--","--","x1",":","array_like",",","1-D","or","2-D","first","of","the","two","independent","samples",",","see","notes","for","2-D","case","x2",":","array_like",",","1-D","or","2-D","second","of","the","two","independent","samples",",","see","notes","for","2-D","case","alternative",":","str","The","alternative","hypothesis",",","H1",",","has","to","be","one","of","the","following","'two-sided","'",":","H1",":","difference","in","means","not","equal","to","value","(","default",")","'larger","'",":","H1",":","difference","in","means","larger","than","value","'smaller","'",":","H1",":","difference","in","means","smaller","than","value","usevar",":","str",",","'pooled","'","or","'unequal'","If","``","pooled","``",",","then","the","standard","deviation","of","the","samples","is","assumed","to","be","the","same",".","If","``","unequal","``",",","then","Welch","ttest","with","Satterthwait","degrees","of","freedom","is","used","value",":","float","difference","between","the","means","under","the","Null","hypothesis",".","Returns","--","--","--","-","tstat",":","float","test","statistic","pvalue",":","float","pvalue","of","the","t-test","df",":","int","or","float","degrees","of","freedom","used","in","the","t-test","Notes","--","--","-","The","result","is","independent","of","the","user","specified","ddof","."]
code: def ttest_ind(
      self, alternative="two-sided", usevar="pooled", value=0
  ):
      """ttest for the null hypothesis of identical means
  
      this should also be the same as onewaygls, except for ddof differences
  
      Parameters
      ----------
      x1 : array_like, 1-D or 2-D
          first of the two independent samples, see notes for 2-D case
      x2 : array_like, 1-D or 2-D
          second of the two independent samples, see notes for 2-D case
      alternative : str
          The alternative hypothesis, H1, has to be one of the following
          'two-sided': H1: difference in means not equal to value (default)
          'larger' :   H1: difference in means larger than value
          'smaller' :  H1: difference in means smaller than value
  
      usevar : str, 'pooled' or 'unequal'
          If ``pooled``, then the standard deviation of the samples is assumed to be
          the same. If ``unequal``, then Welch ttest with Satterthwait degrees
          of freedom is used
      value : float
          difference between the means under the Null hypothesis.
  
  
      Returns
      -------
      tstat : float
          test statistic
      pvalue : float
          pvalue of the t-test
      df : int or float
          degrees of freedom used in the t-test
  
      Notes
      -----
      The result is independent of the user specified ddof.
  
      """
      d1 = self.d1
      d2 = self.d2
  
      if usevar == "pooled":
          stdm = self.std_meandiff_pooledvar
          dof = d1.nobs - 1 + d2.nobs - 1
      elif usevar == "unequal":
          stdm = self.std_meandiff_separatevar
          dof = self.dof_satt()
      else:
          raise ValueError('usevar can only be "pooled" or "unequal"')
  
      tstat, pval = _tstat_generic(
          d1.mean, d2.mean, stdm, dof, alternative, diff=value
      )
  
      return tstat, pval, dof
  
imports: import numpy
  from scipy import stats
  from statsmodels.tools.decorators import cache_readonly
label_desc: Use image node_id 7 for calling the CompareMeans obj's underlying member method code with example usage: obj.ttest_ind(alternative, usevar, value) and returns: tstat,  pval,  dof