class_docstr: Autoregressive AR-X(p) model.
  
  Estimate an AR-X model using Conditional Maximum Likelihood (OLS).
  
  Parameters
  ----------
  endog : array_like
      A 1-d endogenous response variable. The dependent variable.
  lags : {None, int, list[int]}
      The number of lags to include in the model if an integer or the
      list of lag indices to include.  For example, [1, 4] will only
      include lags 1 and 4 while lags=4 will include lags 1, 2, 3, and 4.
      None excludes all AR lags, and behave identically to 0.
  trend : {'n', 'c', 't', 'ct'}
      The trend to include in the model:
  
      * 'n' - No trend.
      * 'c' - Constant only.
      * 't' - Time trend only.
      * 'ct' - Constant and time trend.
  
  seasonal : bool
      Flag indicating whether to include seasonal dummies in the model. If
      seasonal is True and trend includes 'c', then the first period
      is excluded from the seasonal terms.
  exog : array_like, optional
      Exogenous variables to include in the model. Must have the same number
      of observations as endog and should be aligned so that endog[i] is
      regressed on exog[i].
  hold_back : {None, int}
      Initial observations to exclude from the estimation sample.  If None,
      then hold_back is equal to the maximum lag in the model.  Set to a
      non-zero value to produce comparable models with different lag
      length.  For example, to compare the fit of a model with lags=3 and
      lags=1, set hold_back=3 which ensures that both models are estimated
      using observations 3,...,nobs. hold_back must be >= the maximum lag in
      the model.
  period : {None, int}
      The period of the data. Only used if seasonal is True. This parameter
      can be omitted if using a pandas object for endog that contains a
      recognized frequency.
  missing : str
      Available options are 'none', 'drop', and 'raise'. If 'none', no nan
      checking is done. If 'drop', any observations with nans are dropped.
      If 'raise', an error is raised. Default is 'none'.
  deterministic : DeterministicProcess
      A deterministic process.  If provided, trend and seasonal are ignored.
      A warning is raised if trend is not "n" and seasonal is not False.
  
  Examples
  --------
  Use AutoREG to forecast univariate data.
  
  >>> from sktime.forecasting.auto_reg import AutoREG  # doctest: +SKIP
  >>> from sktime.datasets import load_airline
  >>> from sktime.forecasting.base import ForecastingHorizon
  >>> data = load_airline()
  >>> autoreg_sktime = AutoREG(lags=2, trend="c")  # doctest: +SKIP
  >>> autoreg_sktime.fit(y=data)  # doctest: +SKIP
  AutoREG(lags=2)
  >>> fh = ForecastingHorizon([x for x in range(1, 13)])
  >>> y_pred = autoreg_sktime.predict(fh=fh)  # doctest: +SKIP
  
  
  Use AutoREG to forecast with exogenous data.
  
  >>> from sktime.forecasting.auto_reg import AutoREG  # doctest: +SKIP
  >>> from sktime.datasets import load_longley
  >>> from sktime.forecasting.base import ForecastingHorizon
  >>> y, X_og = load_longley()
  >>> X_oos = X_og.iloc[-5:, :]
  >>> y, X = y.iloc[:-5], X_og.iloc[:-5, :]
  >>> X, X_oos = X[["GNPDEFL", "GNP"]], X_oos[["GNPDEFL", "GNP"]]
  >>> autoreg_sktime = AutoREG(lags=2, trend="c")  # doctest: +SKIP
  >>> autoreg_sktime.fit(y=y, X=X)  # doctest: +SKIP
  AutoREG(lags=2)
  >>> fh = ForecastingHorizon([x for x in range(1, 4)])
  >>> y_pred = autoreg_sktime.predict(X=X_oos, fh=fh)  # doctest: +SKIP
docstr: Forecast time series at future horizon.
  
  private _predict containing the core logic, called from predict
  
  State required:
      Requires state to be "fitted".
  
  Accesses in self:
      Fitted model attributes ending in "_"
      self.cutoff
  
  Parameters
  ----------
  fh : guaranteed to be ForecastingHorizon or None, optional (default=None)
      The forecasting horizon with the steps ahead to to predict.
      If not passed in _fit, guaranteed to be passed here
  X : pd.DataFrame, optional (default=None)
      Exogenous time series
  
  Returns
  -------
  y_pred : pd.Series
      Point predictions
docstr_tok: ["Forecast","time","series","at","future","horizon",".","private","_predict","containing","the","core","logic",",","called","from","predict","State","required",":","Requires","state","to","be","``","fitted","''",".","Accesses","in","self",":","Fitted","model","attributes","ending","in","``","_","''","self.cutoff","Parameters","--","--","--","--","--","fh",":","guaranteed","to","be","ForecastingHorizon","or","None",",","optional","(","default=None",")","The","forecasting","horizon","with","the","steps","ahead","to","to","predict",".","If","not","passed","in","_fit",",","guaranteed","to","be","passed","here","X",":","pd.DataFrame",",","optional","(","default=None",")","Exogenous","time","series","Returns","--","--","--","-","y_pred",":","pd.Series","Point","predictions"]
code: def _predict(self, fh, X=None):
      """Forecast time series at future horizon.
  
      private _predict containing the core logic, called from predict
  
      State required:
          Requires state to be "fitted".
  
      Accesses in self:
          Fitted model attributes ending in "_"
          self.cutoff
  
      Parameters
      ----------
      fh : guaranteed to be ForecastingHorizon or None, optional (default=None)
          The forecasting horizon with the steps ahead to to predict.
          If not passed in _fit, guaranteed to be passed here
      X : pd.DataFrame, optional (default=None)
          Exogenous time series
  
      Returns
      -------
      y_pred : pd.Series
          Point predictions
      """
      # statsmodels requires zero-based indexing starting at the
      # beginning of the training series when passing integers
  
      start, end = fh.to_absolute_int(self._y.index[0], self.cutoff)[
          [0, -1]
      ]
      # statsmodels forecasts all periods from start to end of forecasting
      # horizon, but only return given time points in forecasting horizon
      valid_indices = fh.to_absolute_index(self.cutoff)
  
      y_pred = self._fitted_forecaster.predict(
          start=start,
          end=end,
          exog=self._X,
          exog_oos=X,
          dynamic=self.dynamic,
      )
      y_pred.name = self._y.name
  
      return y_pred.loc[valid_indices]
  
imports: from sktime.forecasting.base.adapters import _StatsModelsAdapter
label_desc: Use image node_id 3 for calling the AutoREG obj's underlying member method code with example usage: obj._predict(fh, X) and returns: y_pred