Back to models
Param Estimator

StationarityADF

Test for stationarity via the Augmented Dickey-Fuller Unit Root Test (ADF).

Quickstart

python
from sktime.param_est.stationarity import StationarityADF

estimator = StationarityADF(p_threshold=0.05, maxlag=None, regression='c', autolag='AIC')

Parameters(4)

p_thresholdfloat, optional, default=0.05
significance threshold to apply in testing for stationarity
maxlagint or None, optional, default=None

Maximum lag which is included in test, default value of 12*(nobs/100)^{1/4} is used when None.

regressionstr, one of {“c”,”ct”,”ctt”,”n”}, optional, default=”c”

Constant and trend order to include in regression.

  • “c”: constant only (default).

  • “ct”: constant and trend.

  • “ctt”: constant, and linear and quadratic trend.

  • “n”: no constant, no trend.

autolagone of {“AIC”, “BIC”, “t-stat”, None}, optional, default=”AIC”

Method to use when automatically determining the lag length among the values 0, 1, …, maxlag.

  • If “AIC” (default) or “BIC”, then the number of lags is chosen to minimize the corresponding information criterion.

  • “t-stat” based choice of maxlag. Starts with maxlag and drops a lag until the t-statistic on the last lag length is significant using a 5%-sized test.

  • If None, then the number of included lags is set to maxlag.

Examples

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