PartialAutocorrelation: PartialAutocorrelation

Description Usage Arguments Details Value

Description

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:

Usage

1

Arguments

arr

KHIVA array with the time series.

lags

KHIVA array with the lags to be calculated.

Details

α_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

Value

: KHIVA array with the partial autocorrelation for each time series for the given lag.


shapelets/khiva-r documentation built on June 10, 2019, 4:58 a.m.