Skip to main content

unit_root

Perform Augmented Dickey-Fuller (ADF) unit root test.

The ADF test is a popular method for testing the presence of a unit root in a time series. A unit root indicates that the series may be non-stationary, meaning its statistical properties such as mean, variance, and autocorrelation can change over time. The presence of a unit root suggests that the time series might be influenced by a random walk process, making it unpredictable and challenging for modeling and forecasting. The 'regression' parameter allows you to specify the model used in the test: 'c' for a constant term, 'ct' for a constant and trend term, and 'ctt' for a constant, linear, and quadratic trend. This flexibility helps tailor the test to the specific characteristics of your data, providing a more accurate assessment of its stationarity.

obb.econometrics.unit_root(data: Union[list, dict, pd.DataFrame, List[pd.DataFrame], pd.Series, List[pd.Series], numpy.ndarray, Data, List[Data]], column: str, regression: Literal[str] = c)

Parameters​

NameTypeDescriptionDefaultOptional
dataList[Data]Input dataset.NoneFalse
columnstrData columns to check unit rootNoneFalse
regressionLiteral["c", "ct", "ctt"]Regression type to use in the test. Either "c" for constant only, "ct" for constant and trend, or "ctt" for
constant, trend, and trend-squared.cTrue

Returns​

OBBject with the results being the score from the test.

On this page