vDataFrame.pacf¶
In [ ]:
vDataFrame.pacf(column: str,
ts: str,
by: list = [],
p=12,
unit: str = "rows",
confidence: bool = True,
alpha: float = 0.95,
show: bool = True,
ax = None,
**style_kwds,)
Computes the partial autocorrelations of the input vcolumn.
Parameters¶
Name | Type | Optional | Description |
---|---|---|---|
ts | str | ❌ | A time series vcolumn (date or numerical type) used to order the data. |
column | str | ❌ | Input vcolumn to use to compute the Auto Correlation Plot. |
by | list | ✓ | vcolumns used in the partition. |
p | int / list | ✓ | Either the maximum number of lag to consider during the computation (positive int) or a list of the different lags to include in the computation (list of positive integers). |
unit | str | ✓ | Unit to use to compute the lags.
|
confidence | bool | ✓ | If set to True, the confidence band width is drawn. |
alpha | float | ✓ | Significance Level. Probability to accept H0. Only used to compute the confidence band width. |
show | bool | ✓ | If True, the plot will be drawn using Matplotlib. |
ax | Matplotlib axes object | ✓ | The axes to plot on. |
**style_kwds | any | ✓ | Any optional parameter to pass to the Matplotlib functions. |
Returns¶
tablesample : An object containing the result. For more information, see utilities.tablesample.
Example¶
In [16]:
from verticapy.datasets import load_amazon
amazon = load_amazon()
display(amazon)
In [17]:
# Partial Autocorrelation Plot for each 'month' lag
# p = 48: it will compute 48 'months' lags
amazon.pacf(ts = "date",
column = "number",
p = 48,
by = ["state"],
unit = "month")
Out[17]:
In [18]:
# Partial Autocorrelation Plot using only the selected lags
amazon.pacf(ts = "date",
column = "number",
by = ["state"],
p = [1, 3, 6, 7],
unit = "year")
Out[18]:
See Also¶
vDataFrame.acf | Computes the Correlations between a vcolumn and its lags. |
vDataFrame.corr | Computes the Correlation Matrix of a vDataFrame. |
vDataFrame.cov | Computes the Covariance Matrix of the vDataFrame. |
vDataFrame.interpolate | Interpolates and computes a regular time interval vDataFrame. |