Two of the common types of multivariate models are multiple regression with correlated errors and vector autoregression, which use exogeneous variables to help predict the response variable. In addition to using multiple variables at the same time $t$ as the response, lagged variables may be useful for predicting the response.
Lag effect - the value of a variable at a previous time is correlated with the repsonse at the current time.
dplyr::lag
can be used to lag variables in R.
The cross-correlation between two variables at multiple lags may be useful in assessing if lags of a variable would be useful in the model.
The cross-correlation between variables $X_{t1}$ and $X_{t2}$ at lag k is the correlation between $X_{t,1}$ and $X_{t-k,2}$.
In R, the function ccf
will calculate the cross-correlation between two variables for a given range of lags.
Where $Z_t$ may satisfy an AR(p) process.
VAR models use an autoregressive approach to model the correlation between multiple time series. The computation by hand is significant.
In R, use VARselect
and VAR
from vars
.