Description Usage Arguments Details Value
Calculates the value of the partial autocorrelation function at the given lag. The lag k partial autocorrelation of a time series \lbrace x_t, t = 1 … T \rbrace equals the partial correlation of x_t and x_{t-k}, adjusted for the intermediate variables \lbrace x_{t-1}, …, x_{t-k+1} \rbrace ([1]). Following [2], it can be defined as:
1 | PartialAutocorrelation(arr, lags)
|
arr |
KHIVA array with the time series. |
lags |
KHIVA array with the lags to be calculated. |
α_k = \frac{ Cov(x_t, x_{t-k} | x_{t-1}, …, x_{t-k+1})} {√{ Var(x_t | x_{t-1}, …, x_{t-k+1}) Var(x_{t-k} | x_{t-1}, …, x_{t-k+1} )}}
with (a) x_t = f(x_{t-1}, …, x_{t-k+1}) and (b) x_{t-k} = f(x_{t-1}, …, x_{t-k+1}) being AR(k-1) models that can be fitted by OLS. Be aware that in (a), the regression is done on past values to predict x_t whereas in (b), future values are used to calculate the past value x_{t-k}. It is said in [1] that "for an AR(p), the partial autocorrelations α_k will be nonzero for k<=p and zero for k>p." With this property, it is used to determine the lag of an AR-Process.
[1] Box, G. E., Jenkins, G. M., Reinsel, G. C., & Ljung, G. M. (2015). Time series analysis: forecasting and control. John Wiley & Sons. [2] https://onlinecourses.science.psu.edu/stat510/node/62
: KHIVA array with the partial autocorrelation for each time series for the given lag.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.