class_docstr:     An abstract statistical model class for panel (longitudinal) datasets.
  
      Parameters
      ----------
      endog : array_like or str
          If a pandas object is used then endog should be the name of the
          endogenous variable as a string.
  #    exog
  #    panel_arr
  #    time_arr
      panel_data : pandas.Panel object
  
      Notes
      -----
      If a pandas object is supplied it is assumed that the major_axis is time
      and that the minor_axis has the panel variable.
      
class_docstr_tok: ["An","abstract","statistical","model","class","for","panel","(","longitudinal",")","datasets",".","Parameters","--","--","--","--","--","endog",":","array_like","or","str","If","a","pandas","object","is","used","then","endog","should","be","the","name","of","the","endogenous","variable","as","a","string",".","#","exog","#","panel_arr","#","time_arr","panel_data",":","pandas.Panel","object","Notes","--","--","-","If","a","pandas","object","is","supplied","it","is","assumed","that","the","major_axis","is","time","and","that","the","minor_axis","has","the","panel","variable","."]
docstr: method : LSDV, demeaned, MLE, GLS, BE, FE, optional
  model :
          between
          fixed
          random
          pooled
          [gmm]
  effects :
          oneway
          time
          twoway
  femethod : demeaned (only one implemented)
             WLS
  remethod :
          swar -
          amemiya
          nerlove
          walhus
  
  
  Notes
  -----
  This is unfinished.  None of the method arguments work yet.
  Only oneway effects should work.
docstr_tok: ["method",":","LSDV",",","demeaned",",","MLE",",","GLS",",","BE",",","FE",",","optional","model",":","between","fixed","random","pooled","[","gmm","]","effects",":","oneway","time","twoway","femethod",":","demeaned","(","only","one","implemented",")","WLS","remethod",":","swar","-","amemiya","nerlove","walhus","Notes","--","--","-","This","is","unfinished",".","None","of","the","method","arguments","work","yet",".","Only","oneway","effects","should","work","."]
code: def fit(self, model=None, method=None, effects="oneway"):
      """
      method : LSDV, demeaned, MLE, GLS, BE, FE, optional
      model :
              between
              fixed
              random
              pooled
              [gmm]
      effects :
              oneway
              time
              twoway
      femethod : demeaned (only one implemented)
                 WLS
      remethod :
              swar -
              amemiya
              nerlove
              walhus
  
  
      Notes
      -----
      This is unfinished.  None of the method arguments work yet.
      Only oneway effects should work.
      """
      if method:  # get rid of this with default
          method = method.lower()
      model = model.lower()
      if method and method not in [
          "lsdv",
          "demeaned",
          "mle",
          "gls",
          "be",
          "fe",
      ]:
          # get rid of if method with default
          raise ValueError("%s not a valid method" % method)
      #        if method == "lsdv":
      #            self.fit_lsdv(model)
      if model == "pooled":
          return GLS(self.endog, self.exog).fit()
      if model == "between":
          return self._fit_btwn(method, effects)
      if model == "fixed":
          return self._fit_fixed(method, effects)
  
imports: from functools import reduce
  import numpy
  from statsmodels.regression.linear_model import GLS
  from pandas import Panel
label_desc: Use image node_id 5 for calling the PanelModel obj's underlying member method code with example usage: obj.fit(model, method, effects) and returns: GLS, self, self