Back to models
Param Estimator

StationarityVarianceRatio

Test for stationarity via the variance ratio test for random walks.

Quickstart

python
from sktime.param_est.stationarity import StationarityVarianceRatio

estimator = StationarityVarianceRatio(lags=2, trend='c', overlap=True, robust=True, debiased=True, p_threshold=0.05)

Parameters(5)

lagsint
The number of periods to used in the multi-period variance, which is the numerator of the test statistic. Must be at least 2
trend{“n”, “c”}, optional
“c” allows for a non-zero drift in the random walk, while “n” requires that the increments to y are mean 0
overlapbool, optional
Indicates whether to use all overlapping blocks. Default is True. If False, the number of observations in y minus 1 must be an exact multiple of lags. If this condition is not satisfied, some values at the end of y will be discarded.
robustbool, optional
Indicates whether to use heteroskedasticity robust inference. Default is True.
debiasedbool, optional
Indicates whether to use a debiased version of the test. Default is True. Only applicable if overlap is True.

Examples

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