LPTime (version 1.0-2)

VAR: Estimates a Vector Autoregressive model of order $p$.

Description

Estimation of a Vector Autoregressive model (VAR) by computing OLS per equation.

Usage

VAR(y, p = 1, exogen = NULL)

Arguments

y
Endogenous variable for the VAR model.
p
lag-order for the autoregressive model.
exogen
Exogenous variable for the VAR model.

Value

  • A matrix of coefficients from fitting the VAR model.

Details

Estimates a VAR by OLS per equation. The model is of the following form $$\bold{y}_t = A_1 \bold{y}_{t-1} + \ldots + 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, \ldots, A_p$ are of dimension $K \times K$. No seasonality or trend term can be included in the model.

References

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

See Also

LPTime

Examples

library(LPTime)
data(EyeTrack.sample)
head( VAR(y = EyeTrack.sample, p = 2))