class_docstr: statistics by groups (another version)
  
  groupstats as a class with lazy evaluation (not yet - decorators are still
  missing)
  
  written this time as equivalent of scipy.stats.rankdata
  gs = GroupsStats(X, useranks=True)
  assert_almost_equal(gs.groupmeanfilter, stats.rankdata(X[:,0]), 15)
  
  TODO: incomplete doc strings
class_docstr_tok: ["statistics","by","groups","(","another","version",")","groupstats","as","a","class","with","lazy","evaluation","(","not","yet","-","decorators","are","still","missing",")","written","this","time","as","equivalent","of","scipy.stats.rankdata","gs","=","GroupsStats","(","X",",","useranks=True",")","assert_almost_equal","(","gs.groupmeanfilter",",","stats.rankdata","(","X","[",":",",0","]",")",",","15",")","TODO",":","incomplete","doc","strings"]
docstr: descriptive statistics by groups
  
  Parameters
  ----------
  x : ndarray, 2d
      first column data, second column group labels
  useranks : bool
      if true, then use ranks as data corresponding to the
      scipy.stats.rankdata definition (start at 1, ties get mean)
  uni, intlab : arrays (optional)
      to avoid call to unique, these can be given as inputs
docstr_tok: ["descriptive","statistics","by","groups","Parameters","--","--","--","--","--","x",":","ndarray",",","2d","first","column","data",",","second","column","group","labels","useranks",":","bool","if","true",",","then","use","ranks","as","data","corresponding","to","the","scipy.stats.rankdata","definition","(","start","at","1",",","ties","get","mean",")","uni",",","intlab",":","arrays","(","optional",")","to","avoid","call","to","unique",",","these","can","be","given","as","inputs"]
code: def __init__(self, x, useranks=False, uni=None, intlab=None):
      """descriptive statistics by groups
  
      Parameters
      ----------
      x : ndarray, 2d
          first column data, second column group labels
      useranks : bool
          if true, then use ranks as data corresponding to the
          scipy.stats.rankdata definition (start at 1, ties get mean)
      uni, intlab : arrays (optional)
          to avoid call to unique, these can be given as inputs
  
  
      """
      self.x = np.asarray(x)
      if intlab is None:
          uni, intlab = np.unique(x[:, 1], return_inverse=True)
      elif uni is None:
          uni = np.unique(x[:, 1])
  
      self.useranks = useranks
  
      self.uni = uni
      self.intlab = intlab
      self.groupnobs = groupnobs = np.bincount(intlab)
  
      # temporary until separated and made all lazy
      self.runbasic(useranks=useranks)
  
imports: from collections import namedtuple
  from statsmodels.compat.python import lzip, lrange
  import copy
  import math
  import numpy
  from numpy.testing import assert_almost_equal, assert_equal
  from scipy import stats, interpolate
  from statsmodels.iolib.table import SimpleTable
  from statsmodels.stats.multitest import multipletests, _ecdf, fdrcorrection, fdrcorrection_twostage
  from statsmodels.graphics import utils
  from statsmodels.tools.sm_exceptions import ValueWarning
label_desc: Use image node_id 1 to create a new GroupsStats object  with example: obj = GroupsStats(x, useranks, uni, intlab)