Estimates a Vector Autoregressive model of order p.
Estimation of a Vector Autoregressive model (VAR) by computing OLS per equation.
VAR(y, p = 1, exogen = NULL)
y |
Endogenous variable for the VAR model. |
p |
lag-order for the autoregressive model. |
exogen |
Exogenous variable for the VAR model. |
Estimates a VAR by OLS per equation. The model is of the following form
\bold{y}_t = A_1 \bold{y}_{t-1} + … + A_p \bold{y}_{t-p} + CD_t + \bold{u}_t
where \bold{y}_t is a K \times 1 vector of endogenous variables and u_t assigns a spherical disturbance term of the same dimension. The coefficient matrices A_1, …, A_p are of dimension K \times K. No seasonality or trend term can be included in the model.
A matrix of coefficients from fitting the VAR model.
Shinjini Nandi
Wei, William W.S. (2006). Time Series Analysis - Univariate and Multivariate Methods
Brockwell, P.J. and Davis, R.A. (1996). Introduction to Time Series and Forecasting , Second Edition, Springer, New York
library(LPTime) data(EyeTrack.sample) head( VAR(y = EyeTrack.sample, p = 2))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.