Back to models
Param Estimator

StationarityDFGLS

Test for stationarity via the Dickey-Fuller GLS (DFGLS) Unit Root Test.

Direct interface to DFGLS test from the arch package.

Uses arch.unitroot.DFGLS 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.

Quickstart

python
from sktime.param_est.stationarity import StationarityDFGLS

estimator = StationarityDFGLS(lags=None, trend='c', max_lags=None, method='aic', p_threshold=0.05)

Tags

Capabilities

  • Multivariate: Not supported
  • Missing values: Not supported

Parameters(4)

lagsint, 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”, “ct”}, optional

The trend component to include in the test

  • “c” - Include a constant (Default)

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

max_lagsint, optional

The maximum number of lags to use when selecting lag length. When using automatic lag length selection, the lag is selected using OLS detrending rather than GLS detrending ([2]_).

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

Examples

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