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","."]
code: def _fit_btwn(self, method, effects):
      # group mean regression or WLS
      if effects != "twoway":
          endog = self._group_mean(self.endog, index=effects)
          exog = self._group_mean(self.exog, index=effects)
      else:
          raise ValueError(
              "%s effects is not valid for the between "
              "estimator" % effects
          )
      befit = GLS(endog, exog).fit()
      return befit
  
imports: from functools import reduce
  import numpy
  from statsmodels.regression.linear_model import GLS
  from pandas import Panel
label_desc: Use image node_id 6 for calling the PanelModel obj's underlying member method code with example usage: obj._fit_btwn(method, effects) and returns: befit