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: construct a CompareMeans object from data
  
  Parameters
  ----------
  data1, data2 : array_like, 1-D or 2-D
      compared datasets
  weights1, weights2 : None or 1-D ndarray
      weights for each observation of data1 and data2 respectively,
      with same length as zero axis of corresponding dataset.
  ddof1, ddof2 : int
      default ddof1=0, ddof2=0, degrees of freedom for data1,
      data2 respectively.
  
  Returns
  -------
  A CompareMeans instance.
docstr_tok: ["construct","a","CompareMeans","object","from","data","Parameters","--","--","--","--","--","data1",",","data2",":","array_like",",","1-D","or","2-D","compared","datasets","weights1",",","weights2",":","None","or","1-D","ndarray","weights","for","each","observation","of","data1","and","data2","respectively",",","with","same","length","as","zero","axis","of","corresponding","dataset",".","ddof1",",","ddof2",":","int","default","ddof1=0",",","ddof2=0",",","degrees","of","freedom","for","data1",",","data2","respectively",".","Returns","--","--","--","-","A","CompareMeans","instance","."]
code: def from_data(
      cls, data1, data2, weights1=None, weights2=None, ddof1=0, ddof2=0
  ):
      """construct a CompareMeans object from data
  
      Parameters
      ----------
      data1, data2 : array_like, 1-D or 2-D
          compared datasets
      weights1, weights2 : None or 1-D ndarray
          weights for each observation of data1 and data2 respectively,
          with same length as zero axis of corresponding dataset.
      ddof1, ddof2 : int
          default ddof1=0, ddof2=0, degrees of freedom for data1,
          data2 respectively.
  
      Returns
      -------
      A CompareMeans instance.
  
      """
      return cls(
          DescrStatsW(data1, weights=weights1, ddof=ddof1),
          DescrStatsW(data2, weights=weights2, ddof=ddof2),
      )
  
imports: import numpy
  from scipy import stats
  from statsmodels.tools.decorators import cache_readonly
label_desc: Use image node_id 2 for calling the CompareMeans obj's underlying member method code with example usage: obj.from_data(cls, data1, data2, weights1, weights2, ddof1, ddof2) and returns: cls