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: runbasic
docstr_tok: ["runbasic"]
code: def runbasic(self, useranks=False):
      """runbasic"""
      # check: refactoring screwed up case useranks=True
  
      # groupxsum = np.bincount(intlab, weights=X[:,0])
      # groupxmean = groupxsum * 1.0 / groupnobs
      x = self.x
      if useranks:
          xuni, xintlab = np.unique(x[:, 0], return_inverse=True)
          ranksraw = x[:, 0].argsort().argsort() + 1  # rankraw
          self.xx = GroupsStats(
              np.column_stack([ranksraw, xintlab]), useranks=False
          ).groupmeanfilter
      else:
          self.xx = x[:, 0]
      self.groupsum = groupranksum = np.bincount(
          self.intlab, weights=self.xx
      )
      # print('groupranksum', groupranksum, groupranksum.shape, self.groupnobs.shape
      # start at 1 for stats.rankdata :
      self.groupmean = grouprankmean = (
          groupranksum * 1.0 / self.groupnobs
      )  # + 1
      self.groupmeanfilter = grouprankmean[self.intlab]
  
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 3 for calling the GroupsStats obj's underlying member method code with example usage: obj.runbasic(useranks) without return types