pmdarima.arima.KPSSTest

class pmdarima.arima.KPSSTest(alpha=0.05, null='level', lshort=True)[source][source]

Conduct a KPSS test for stationarity.

In econometrics, Kwiatkowski–Phillips–Schmidt–Shin (KPSS) tests are used for testing a null hypothesis that an observable time series is stationary around a deterministic trend (i.e. trend-stationary) against the alternative of a unit root.

Parameters:

alpha : float, optional (default=0.05)

Level of the test

null : str, optional (default=’level’)

Whether to fit the linear model on the one vector, or an arange. If null is ‘trend’, a linear model is fit on an arange, if ‘level’, it is fit on the one vector.

lshort : bool, optional (default=True)

Whether or not to truncate the l value in the C code.

Notes

This test is generally used indirectly via the pmdarima.arima.ndiffs() function, which computes the differencing term, d.

References

[R59]

R’s tseries KPSS test source code: http://bit.ly/2eJP1IU

Methods

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

is_stationary(x)

Test whether the time series is stationary.

set_params(**params)

Set the parameters of this estimator.

should_diff(x)

Test whether the time series is stationary or needs differencing.

__init__(alpha=0.05, null='level', lshort=True)[source][source]