Back to models
Param Estimator

StationarityKPSSArch

Test for stationarity via the Kwiatkowski-Phillips-Schmidt-Shin Unit Root Test.

Quickstart

python
from sktime.param_est.stationarity import StationarityKPSSArch

estimator = StationarityKPSSArch(lags=None, trend='c', p_threshold=0.05)

Parameters(2)

lagsint, 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

Examples

>>> from sktime.datasets import load_airline
>>> from sktime.param_est.stationarity import StationarityKPSSArch
>>> 
>>> X = load_airline ()
>>> sty_est = StationarityKPSSArch ()
>>> sty_est. fit (X) StationarityKPSSArch(
... )
>>> sty_est. get_fitted_params ()["stationary" ] True