Back to models
Param Estimator

StationarityPhillipsPerron

Test for unit root order 1 via the Phillips-Perron Unit Root Test.

Quickstart

python
from sktime.param_est.stationarity import StationarityPhillipsPerron

estimator = StationarityPhillipsPerron(lags=None, trend='c', test_type='tau', p_threshold=0.05)

Parameters(3)

lagsint, optional

The number of lags to use in the Newey-West estimator of the long-run covariance. If omitted or None, the lag length is set automatically to 12 * (nobs/100) ** (1/4)

trend{“n”, “c”, “ct”}, optional

The trend component to include in the test

  • “n” - No trend components

  • “c” - Include a constant (Default)

  • “ct” - Include a constant and linear time trend

test_type{“tau”, “rho”}
The test to use when computing the test statistic. “tau” is based on the t-stat and “rho” uses a test based on nobs times the re-centered regression coefficient

Examples

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