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 initialize_pandas(self, panel_data, endog_name, exog_name):
      self.panel_data = panel_data
      endog = panel_data[endog_name].values  # does this create a copy?
      self.endog = np.squeeze(endog)
      if exog_name is None:
          exog_name = panel_data.columns.tolist()
          exog_name.remove(endog_name)
      self.exog = panel_data.filterItems(exog_name).values  # copy?
      self._exog_name = exog_name
      self._endog_name = endog_name
      self._timeseries = panel_data.major_axis  # might not need these
      self._panelseries = panel_data.minor_axis
  
imports: from functools import reduce
  import numpy
  from statsmodels.regression.linear_model import GLS
  from pandas import Panel
label_desc: Use image node_id 3 for calling the PanelModel obj's underlying member method code with example usage: obj.initialize_pandas(panel_data, endog_name, exog_name) without return types