adfuller¶
In [ ]:
adfuller(vdf,
column: str,
ts: str,
by: list = [],
p: int = 1,
with_trend: bool = False,
regresults: bool = False)
Augmented Dickey-Fuller test (time series stationarity).
| Name | Type | Optional | Description |
|---|---|---|---|
vdf | vDataFrame | ❌ | Input vDataFrame. |
column | str | ❌ | Input vcolumn to test. |
ts | str | ❌ | vcolumn used as timeline. It will be to use to order the data. It can be a numerical or type date like (date, datetime, timestamp...) vcolumn. |
by | list | ✓ | vcolumns used in the partition. |
p | int | ✓ | Number of lags to consider in the test. |
with_trend | bool | ✓ | Adds a trend in the Regression. |
regresults | bool | ✓ | If True, the full regression results are returned. |
Returns¶
tablesample : An object containing the result. For more information, see utilities.tablesample.
Example¶
In [91]:
from verticapy import *
texas = vDataFrame("Texas")
texas["cases"].plot(ts = "date")
In [92]:
from verticapy.stats import adfuller
adfuller(texas,
column = "cases",
ts = "date",
p = 1,
with_trend = True)
Out[92]:
In [94]:
# Result of the Regression
adfuller(texas,
column = "cases",
ts = "date",
p = 5,
regresults = True)
Out[94]:
