Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

## Vector Autoregression (VAR) Models

### Types of Multivariate Time Series Models

The basic multivariate time series models based on linear autoregressive, moving average models are:

Model NameAbbreviationEquation
Vector Autoregression VAR(p)

`${y}_{t}=c+\sum _{i=1}^{p}{\Phi }_{i}{y}_{t-i}+{\epsilon }_{t}$`

Vector Moving Average VMA(q)

`${y}_{t}=c+\sum _{j=1}^{q}{\Theta }_{j}{\epsilon }_{t-j}+{\epsilon }_{t}$`

Vector Autoregression Moving Average VARMA(p, q)

`${y}_{t}=c+\sum _{i=1}^{p}{\Phi }_{i}{y}_{t-i}+\sum _{j=1}^{q}{\Theta }_{j}{\epsilon }_{t-j}+{\epsilon }_{t}$`

Vector Autoregression Moving Average with a linear time trendVARMA(p, q)

`${y}_{t}=c+\delta t+\sum _{i=1}^{p}{\Phi }_{i}{y}_{t-i}+\sum _{j=1}^{q}{\Theta }_{j}{\epsilon }_{t-j}+{\epsilon }_{t}$`

Vector Autoregression Moving Average with eXogenous inputs VARMAX(p, q)

`${y}_{t}=c+\beta {x}_{t}+\sum _{i=1}^{p}{\Phi }_{i}{y}_{t-i}+\sum _{j=1}^{q}{\Theta }_{j}{\epsilon }_{t-j}+{\epsilon }_{t}$`

Structural Vector Autoregression Moving AverageSVARMA(p, q)

`${\Phi }_{0}{y}_{t}=c+\sum _{i=1}^{p}{\Phi }_{i}{y}_{t-i}+\sum _{j=1}^{q}{\Theta }_{j}{\epsilon }_{t-j}+{\Theta }_{0}{\epsilon }_{t}$`

The following variables appear in the equations:

• yt is the vector of response time series variables at time t. yt has n elements.

• c is a constant vector of offsets, with n elements.

• Φi are n-by-n matrices for each i. The Φi are autoregressive matrices. There are p autoregressive matrices, and some can be entirely composed of zeros.

• εt is a vector of serially uncorrelated innovations, vectors of length n. The εt are multivariate normal random vectors with a covariance matrix Σ.

• Θj are n-by-n matrices for each j. The Θj are moving average matrices. There are q moving average matrices, and some can be entirely composed of zeros.

• δ is a constant vector of linear time trend coefficients, with n elements.

• xt is an r-by-1 vector representing exogenous terms at each time t. r is the number of exogenous series. Exogenous terms are data (or other unmodeled inputs) in addition to the response time series yt. Each exogenous series appears in all response equations.

• β is an n-by-r constant matrix of regression coefficients of size r. So the product βxt is a vector of size n.

Generally, the time series yt and xt are observable. In other words, if you have data, it represents one or both of these series. You do not always know the offset c, trend coefficient δ, coefficient β, autoregressive matrices Φi, and moving average matrices Θj. You typically want to fit these parameters to your data. See `estimate` for ways to estimate unknown parameters. The innovations εt are not observable, at least in data, though they can be observable in simulations.

Econometrics Toolbox™ supports the creation and analysis of the VAR(p) model using `varm` and associated methods.

### Lag Operator Representation

There is an equivalent representation of the linear autoregressive equations in terms of lag operators. The lag operator L moves the time index back by one: Lyt = yt–1. The operator Lm moves the time index back by m: Lmyt = ytm.

In lag operator form, the equation for a SVARMAX(p, q) model becomes

`$\left({\Phi }_{0}-\sum _{i=1}^{p}{\Phi }_{i}{L}^{i}\right){y}_{t}=c+\beta {x}_{t}+\left({\Theta }_{0}+\sum _{j=1}^{q}{\Theta }_{j}{L}^{j}\right){\epsilon }_{t}.$`

This equation can be written as

`$\Phi \left(L\right){y}_{t}=c+\beta {x}_{t}+\Theta \left(L\right){\epsilon }_{t},$`

where

`$\Theta \left(L\right)={\Theta }_{0}-\sum _{i=1}^{p}{\Theta }_{i}{L}^{i}$`

and

`$\Theta \left(L\right)={\Theta }_{0}+\sum _{j=1}^{q}{\Theta }_{j}{L}^{j}.$`

### Stable and Invertible Models

A VAR model is stable if

This condition implies that, with all innovations equal to zero, the VAR process converges to c as time goes on. See Lütkepohl [80] Chapter 2 for a discussion.

A VMA model is invertible if

This condition implies that the pure VAR representation of the process is stable. See Lütkepohl [80] Chapter 11 for a discussion of invertible VMA models.

A VARMA model is stable if its VAR polynomial is stable. Similarly, a VARMA model is invertible if its VMA polynomial is invertible.

There is no well-defined notion of stability or invertibility for models with exogenous inputs (e.g., VARMAX models). An exogenous input can destabilize a model.

### Building VAR Models

To understand a multiple time series model, or multiple time series data, you generally perform the following steps:

1. Import and preprocess data.

2. Specify a model.

1. Creating VAR Models to set up a model using `varm`:

2. Determining an Appropriate Number of Lags to determine an appropriate number of lags for your model

3. Fit the model to data. See Fitting Models to Data to use `estimate` to estimate the unknown parameters in your models.

4. Analyze and forecast using the fitted model. This can involve:

1. Examining the Stability of a Fitted Model to determine whether your model is stable.

2. VAR Model Forecasting to forecast directly from models or to forecast using a Monte Carlo simulation.

3. Calculating Impulse Responses to calculate impulse responses, which give forecasts based on an assumed change in an input to a time series.

4. Compare the results of your model's forecasts to data held out for forecasting. For an example, see VAR Model Case Study.

Your application need not involve all of the steps in this workflow. For example, you might not have any data, but want to simulate a parameterized model. In that case, you would perform only steps 2 and 4 of the generic workflow.

You might iterate through some of these steps.