class_docstr: Nested Conditional Logit (RUNMNL), data handling test
  
  unfinished, does not do anything yet
code: def __init__(self, endog, exog_bychoices, ncommon):
      self.endog = endog
      self.exog_bychoices = exog_bychoices
      self.ncommon = ncommon
      self.nobs, self.nchoices = endog.shape
      self.nchoices = len(exog_bychoices)
  
      # TODO rename beta to params and include inclusive values for nested CL
      betaind = [
          exog_bychoices[ii].shape[1] - ncommon for ii in range(4)
      ]
      zi = np.r_[[ncommon], ncommon + np.array(betaind).cumsum()]
      beta_indices = [
          np.r_[np.array([0, 1]), z[zi[ii] : zi[ii + 1]]]
          for ii in range(len(zi) - 1)
      ]
      self.beta_indices = beta_indices
  
      # for testing only
      beta = np.arange(7)
      betaidx_bychoices = [beta[idx] for idx in beta_indices]
  
file_path: statsmodels/statsmodels/sandbox/regression/runmnl.py
imports: import numpy
  import numpy.lib.recfunctions
  from scipy import optimize
label_desc: Use image node_id 1 to create a new TryNCLogit object  with example: obj = TryNCLogit(endog, exog_bychoices, ncommon)