code: def __init__(self, endog, exog=None, groups=None):
      # take this from a super class, no checking is done here
      nobs = endog.shape[0]
      self.endog = endog
      if exog is not None:
          self.exog = exog
  
      self.groups_start = np.diff(groups) != 0
      self.groups_valid = ~self.groups_start
  
file_path: statsmodels/statsmodels/sandbox/regression/ar_panel.py
imports: import numpy
  from scipy import optimize
  from statsmodels.regression.linear_model import OLS
label_desc: Use image node_id 1 to create a new PanelAR1 object  with example: obj = PanelAR1(endog, exog, groups)