class_docstr: Test for stationarity via the Kwiatkowski-Phillips-Schmidt-Shin Unit Root Test.
  
  Direct interface to ``KPSS`` test from the ``arch`` package.
  Does not assume ARCH process, naming is due to the use of the ``arch`` package.
  
  Uses ``arch.unitroot.KPSS`` as a test for trend-stationarity,
  and derives a boolean statement whether a series is (trend-)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 Newey-West estimator of the long-run
      covariance.  If omitted or None, the number of lags is calculated
      with the data-dependent method of Hobijn et al. (1998). See also
      Andrews (1991), Newey & West (1994), and Schwert (1989).
      Set ``lags=-1`` to use the old method that only depends on the sample
      size, ``12 * (nobs/100) ** (1/4)``.
  trend : {"c", "ct"}, optional
      The trend component to include in the ADF test
          "c" - Include a constant (Default)
          "ct" - Include a constant and linear time trend
  
  Attributes
  ----------
  stationary_ : bool
      whether the series in ``fit`` is stationary according to the test
      more precisely, whether the null of the KPSS test is accepted at ``p_threshold``
  test_statistic_ : float
      The KPSS test statistic, of running ``KPSS`` on ``y`` in ``fit``
  pvalue_ : float : float
      p-value obtained when running ``KPSS`` 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 StationarityKPSSArch
  >>>
  >>> X = load_airline()  # doctest: +SKIP
  >>> sty_est = StationarityKPSSArch()  # doctest: +SKIP
  >>> sty_est.fit(X)  # doctest: +SKIP
  StationarityKPSSArch(...)
  >>> sty_est.get_fitted_params()["stationary"]  # doctest: +SKIP
  True
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 KPSS
  
      p_threshold = self.p_threshold
  
      result = KPSS(
          y=X,
          lags=self.lags,
          trend=self.trend,
      )
      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 StationarityKPSSArch obj's underlying member method code with example usage: obj._fit(X) and returns: self