statsmodels.tsa.stattools.range_unit_root_test#

statsmodels.tsa.stattools.range_unit_root_test(x, store=False, *, use_namedtuple=None)[source]#

Range unit-root test for stationarity

Computes the Range Unit-Root (RUR) test for the null hypothesis that x is stationary.

Parameters:
xarray_like, 1d

The data series to test.

storebool

If True, then a result instance is returned additionally to the RUR statistic (default is False).

use_namedtuplebool, optional

Flag indicating whether to return the results as a RangeUnitRootTestResult NamedTuple instead of a plain tuple. When store=True the NamedTuple holds the same four elements as the legacy tuple, so it unpacks identically and is always returned, with no warning. When store=False the legacy three-element tuple is returned by default and a FutureWarning is issued.

Deprecated since version 0.15.0: In release 0.16.0 or after July 2027, whichever is later, the default will change to always return a RangeUnitRootTestResult. Set use_namedtuple=True to opt in now, or use_namedtuple=False to silence the warning and keep the current return type.

Returns:
RangeUnitRootTestResult

If use_namedtuple=True, a NamedTuple with fields rur_stat, p_value, crit, and resstore (resstore is None when not computed). See RangeUnitRootTestResult.

Otherwise (the deprecated default), a plain tuple whose length depends
on store, made up of a subset of:
rur_statfloat

The RUR test statistic.

p_valuefloat

The p-value of the test. The p-value is interpolated from Table 1 in Aparicio et al. (2006), and a boundary point is returned if the test statistic is outside the table of critical values, that is, if the p-value is outside the interval (0.01, 0.1).

critdict

The critical values at 10%, 5%, 2.5% and 1%. Based on Aparicio et al. (2006).

resstore(optional) instance of ResultsStore

An instance of a dummy class with results attached as attributes.

Notes

The p-values are interpolated from Table 1 of Aparicio et al. (2006). If the computed statistic is outside the table of critical values, then a warning message is generated.

Missing values are not handled.

References

[1]

Aparicio, F., Escribano A., Sipols, A.E. (2006). Range Unit-Root (RUR) tests: robust against nonlinearities, error distributions, structural breaks and outliers. Journal of Time Series Analysis, 27 (4): 545-576.