class_docstr: Test for stationarity via the Zivot-Andrews Unit Root Test.
  
  Direct interface to ``ZivotAndrews`` test from the `arch` package.
  
  Uses ``arch.unitroot.ZivotAndrews`` as a test for unit roots,
  and derives a boolean statement whether a series is stationary.
  
  Also returns test results for the unit root test as fitted parameters.
  
  Parameters
  ----------
  lags : int, optional
      The number of lags to use in the ADF regression. If omitted or None,
      ``method`` is used to automatically select the lag length with no more
      than `max_lags` are included.
  trend : {"c", "t", "ct"}, optional
      The trend component to include in the test
  
      - "c" - Include a constant (Default)
      - "t" - Include a linear time trend
      - "ct" - Include a constant and linear time trend
  
  trim : float
      percentage of series at begin/end to exclude from break-period
      calculation in range [0, 0.333] (default=0.15)
  max_lags : int, optional
      The maximum number of lags to use when selecting lag length
  method : {"AIC", "BIC", "t-stat"}, optional
      The method to use when selecting the lag length
  
      - "AIC" - Select the minimum of the Akaike IC
      - "BIC" - Select the minimum of the Schwarz/Bayesian IC
      - "t-stat" - Select the minimum of the Schwarz/Bayesian IC
  
  Attributes
  ----------
  stationary_ : bool, whether the series in `fit` has a unit root
      (with structural break)
      more precisely, whether the null of the Zivot-Andrews test is rejected at
      ``p_threshold``
  test_statistic_ : float
      The ZA test statistic, of running ``ZivotAndrews`` on ``y`` in ``fit``
  pvalue_ : float : float
      p-value obtained when running ``ZivotAndrews`` on ``y`` in ``fit``
  usedlag_ : int
      The number of lags used in the test.
  
  Examples
  --------
  >>> from sktime.datasets import load_airline
  >>> from sktime.param_est.stationarity import StationarityZivotAndrews
  >>>
  >>> X = load_airline()  # doctest: +SKIP
  >>> sty_est = StationarityZivotAndrews()  # doctest: +SKIP
  >>> sty_est.fit(X)  # doctest: +SKIP
  StationarityZivotAndrews(...)
  >>> sty_est.get_fitted_params()["stationary"]  # doctest: +SKIP
  False
docstr: Fit estimator and estimate parameters.
  
  private _fit containing the core logic, called from fit
  
  Writes to self:
      Sets fitted model attributes ending in "_".
  
  Parameters
  ----------
  X : {ndarray, Series}
  The data to test for a unit root
  
  Returns
  -------
  self : reference to self
docstr_tok: ["Fit","estimator","and","estimate","parameters",".","private","_fit","containing","the","core","logic",",","called","from","fit","Writes","to","self",":","Sets","fitted","model","attributes","ending","in","``","_","''",".","Parameters","--","--","--","--","--","X",":","{","ndarray",",","Series","}","The","data","to","test","for","a","unit","root","Returns","--","--","--","-","self",":","reference","to","self"]
code: def _fit(self, X):
      """Fit estimator and estimate parameters.
  
      private _fit containing the core logic, called from fit
  
      Writes to self:
          Sets fitted model attributes ending in "_".
  
      Parameters
      ----------
      X : {ndarray, Series}
      The data to test for a unit root
  
      Returns
      -------
      self : reference to self
      """
      from arch.unitroot import ZivotAndrews
  
      p_threshold = self.p_threshold
  
      result = ZivotAndrews(
          y=X,
          lags=self.lags,
          trend=self.trend,
          trim=self.trim,
          max_lags=self.max_lags,
          method=self.method,
      )
      self.test_statistic_ = result.stat
      self.pvalue = result.pvalue
      self.stationary_ = result.pvalue <= p_threshold
      self.used_lag_ = result._lags
  
      return self
  
imports: from sktime.param_est.base import BaseParamFitter
label_desc: Use image node_id 2 for calling the StationarityZivotAndrews obj's underlying member method code with example usage: obj._fit(X) and returns: self