class_docstr: A VECM model, or Vector Error Correction Model, is a restricted.
  
  VAR model used for nonstationary series that are cointegrated.r
  
  Parameters
  ----------
  dates : array_like of datetime, optional
      See :class:`statsmodels.tsa.base.tsa_model.TimeSeriesModel` for more
      information.
  freq : str, optional
      See :class:`statsmodels.tsa.base.tsa_model.TimeSeriesModel` for more
      information.
  missing : str, optional, default="none"
      See :class:`statsmodels.base.model.Model` for more information.
  k_ar_diff : int, optional, default=1
      Number of lagged differences in the model. Equals :math:`k_{ar} - 1` in
      the formula above.
  coint_rank : int, optional, default=1
      Cointegration rank, equals the rank of the matrix :math:`\\Pi` and the
      number of columns of :math:`\\alpha` and :math:`\\beta`.
  deterministic : str, optional, default="n"
      must be one of {``"n"``, ``"co"``, ``"ci"``, ``"lo"``, ``"li"``}
  
      * ``"n"`` - no deterministic terms
      * ``"co"`` - constant outside the cointegration relation
      * ``"ci"`` - constant within the cointegration relation
      * ``"lo"`` - linear trend outside the cointegration relation
      * ``"li"`` - linear trend within the cointegration relation
  
      Combinations of these are possible (e.g. ``"cili"`` or ``"colo"`` for
      linear trend with intercept). When using a constant term you have to
      choose whether you want to restrict it to the cointegration relation
      (i.e. ``"ci"``) or leave it unrestricted (i.e. ``"co"``). Do not use
      both ``"ci"`` and ``"co"``. The same applies for ``"li"`` and ``"lo"``
      when using a linear term. See the Notes-section for more information.
  seasons : int, optional, default: 0
      Number of periods in a seasonal cycle. 0 means no seasons.
  first_season : int, optional, default: 0
      Season of the first observation.
  method : str {"ml"}, default: "ml"
      Estimation method to use. "ml" stands for Maximum Likelihood.
  exog_coint : optional, a scalar (float), 1D ndarray of size nobs,
      2D ndarray/pd.DataFrame of size (any, neqs)
      Deterministic terms inside the cointegration relation.
  exog_coint_fc : optional, a scalar (float), 1D ndarray of size nobs,
      2D ndarray/pd.DataFrame of size (any, neqs)
      Forecasted value of exog_coint
  
  Example
  -------
  >>> from sktime.forecasting.vecm import VECM
  >>> from sktime.split import temporal_train_test_split
  >>> from sktime.forecasting.base import ForecastingHorizon
  >>> index = pd.date_range(start="2005", end="2006-12", freq="M")
  >>> df = pd.DataFrame(np.random.randint(0, 100, size=(23, 2)),
  ... columns=list("AB"),
  ... index=pd.PeriodIndex(index))
  >>> train, test = temporal_train_test_split(df)
  >>> sktime_model = VECM()  # doctest: +SKIP
  >>> fh = ForecastingHorizon([1, 3, 4, 5, 7, 9])
  >>> _ = sktime_model.fit(train, fh=fh)  # doctest: +SKIP
  >>> fc2 = sktime_model.predict(fh=fh)  # doctest: +SKIP
docstr: Compute/return prediction quantiles for a forecast.
  
  private _predict_interval containing the core logic,
      called from predict_interval and possibly predict_quantiles
  State required:
      Requires state to be "fitted".
  Accesses in self:
      Fitted model attributes ending in "_"
      self.cutoff
  
  Parameters
  ----------
  fh : guaranteed to be ForecastingHorizon
      The forecasting horizon with the steps ahead to to predict.
  X : optional (default=None)
      guaranteed to be of a type in self.get_tag("X_inner_mtype")
      Exogeneous time series for the forecast
  coverage : list of float (guaranteed not None and floats in [0,1] interval)
     nominal coverage(s) of predictive interval(s)
  
  Returns
  -------
  pred_int : pd.DataFrame
      Column has multi-index: first level is variable name from y in fit,
          second level coverage fractions for which intervals were computed.
              in the same order as in input `coverage`.
          Third level is string "lower" or "upper", for lower/upper interval end.
      Row index is fh, with additional (upper) levels equal to instance levels,
          from y seen in fit, if y_inner_mtype is Panel or Hierarchical.
      Entries are forecasts of lower/upper interval end,
          for var in col index, at nominal coverage in second col index,
          lower/upper depending on third col index, for the row index.
          Upper/lower interval end forecasts are equivalent to
          quantile forecasts at alpha = 0.5 - c/2, 0.5 + c/2 for c in coverage.
code: def _predict_interval(self, fh, X, coverage):
      """Compute/return prediction quantiles for a forecast.
  
      private _predict_interval containing the core logic,
          called from predict_interval and possibly predict_quantiles
      State required:
          Requires state to be "fitted".
      Accesses in self:
          Fitted model attributes ending in "_"
          self.cutoff
  
      Parameters
      ----------
      fh : guaranteed to be ForecastingHorizon
          The forecasting horizon with the steps ahead to to predict.
      X : optional (default=None)
          guaranteed to be of a type in self.get_tag("X_inner_mtype")
          Exogeneous time series for the forecast
      coverage : list of float (guaranteed not None and floats in [0,1] interval)
         nominal coverage(s) of predictive interval(s)
  
      Returns
      -------
      pred_int : pd.DataFrame
          Column has multi-index: first level is variable name from y in fit,
              second level coverage fractions for which intervals were computed.
                  in the same order as in input `coverage`.
              Third level is string "lower" or "upper", for lower/upper interval end.
          Row index is fh, with additional (upper) levels equal to instance levels,
              from y seen in fit, if y_inner_mtype is Panel or Hierarchical.
          Entries are forecasts of lower/upper interval end,
              for var in col index, at nominal coverage in second col index,
              lower/upper depending on third col index, for the row index.
              Upper/lower interval end forecasts are equivalent to
              quantile forecasts at alpha = 0.5 - c/2, 0.5 + c/2 for c in coverage.
      """
      exog_fc = X.values if X is not None else None
      fh_int = fh.to_relative(self.cutoff)
      var_names = (
          self._y.index.name
          if self._y.index.name is not None
          else self._y.columns.values
      )
      int_idx = pd.MultiIndex.from_product(
          [var_names, coverage, ["lower", "upper"]]
      )
  
      all_values = (
          []
      )  # will store predicted intervals for each coverage value
      for c in coverage:
          alpha = 1 - c
          _, y_lower, y_upper = self._fitted_forecaster.predict(
              steps=fh_int[-1],
              exog_fc=exog_fc,
              exog_coint_fc=self.exog_coint_fc,
              alpha=alpha,
          )
          values = []
          for v_idx in range(len(var_names)):
              values.append(y_lower[0][v_idx])
              values.append(y_upper[0][v_idx])
  
          all_values.extend(values)
  
      pred_int = pd.DataFrame(
          [all_values],
          index=fh.to_absolute_index(self.cutoff),
          columns=int_idx,
      )
  
      return pred_int
  
file_path: sktime/sktime/forecasting/vecm.py
imports: import numpy
  import pandas
  from sktime.forecasting.base.adapters import _StatsModelsAdapter
label_desc: Use image node_id 4 for calling the VECM obj's underlying member method code with example usage: obj._predict_interval(fh, X, coverage) and returns: pred_int