# Vector Autoregression Models

Stationary multivariate linear models including exogenous predictor variables

A vector autoregression (VAR) model is a system of simultaneous linear equations that describes the evolution of multiple stationary response series. Equations in the system are functions of constants, time trends, lagged responses, and exogenous predictor variables. For an example of an analysis using VAR modeling tools, see VAR Model Case Study.

To convert your VAR model analysis code from using `vgx` functions to using the `varm` object and its object functions, see Convert from vgx Functions to Model Objects.

## Functions

expand all

 `varm` Create vector autoregression (VAR) model
 `estimate` Fit vector autoregression (VAR) model to data `infer` Infer vector autoregression model (VAR) innovations `summarize` Display estimation results of vector autoregression (VAR) model
 `gctest` Granger causality and block exogeneity tests for vector autoregression (VAR) models `irf` Generate vector autoregression (VAR) model impulse responses `fevd` Generate vector autoregression (VAR) model forecast error variance decomposition (FEVD) `gctest` Block-wise Granger causality and block exogeneity tests `armairf` Generate or plot ARMA model impulse responses `armafevd` Generate or plot ARMA model forecast error variance decomposition (FEVD)
 `arma2ar` Convert ARMA model to AR model `arma2ma` Convert ARMA model to MA model `vec2var` Convert VEC model to VAR model `var2vec` Convert VAR model to VEC model `vecm` Convert vector autoregression (VAR) model to vector error-correction (VEC) model
 `simulate` Monte Carlo simulation of vector autoregression (VAR) model `filter` Filter disturbances through vector autoregression (VAR) model
 `forecast` Forecast vector autoregression (VAR) model responses

## Topics

### Create Model

Create and Adjust VAR Model Using Shorthand Syntax

This example shows how to create a three-dimensional VAR(4) model with unknown parameters using `varm` and the shorthand syntax.

Create and Adjust VAR Model Using Longhand Syntax

This example shows how to create a three-dimensional VAR(4) model with unknown parameters using `varm` and the longhand syntax.

Vector Autoregression (VAR) Model Creation

Represent a vector autoregression (VAR) model using a `varm` object.

Vector Autoregression (VAR) Models

Learn the characteristics of vector autoregression models and how to create them.

Convert from vgx Functions to Model Objects

Convert common tasks that use the `vgx` functions to the newer functionality.

### Fit Model to Data

Multivariate Time Series Data Formats

Prepare your data for a multivariate time series analysis.

VAR Model Estimation

Fit VAR models to data.

Fit VAR Model to Simulated Data

Simulate data from a known VAR model, then fit a VAR model to the simulated data.

Fit VAR Model of CPI and Unemployment Rate

Estimate a VAR model composed of the consumer price index and unemployment rate.

Implement Seemingly Unrelated Regression

Include exogenous predictors in a VAR model to estimate a regression component along with all other parameters.

Estimate Capital Asset Pricing Model Using SUR

Implement the capital asset pricing model (CAPM) using the Econometrics Toolbox™ VAR model framework.

VAR Model Case Study

Analyze a VAR model.

### Impulse Response Functions and Granger Causality

Generate VAR Model Impulse Responses

Generate impulse responses of an interest rate shock on real GDP.

Compare Generalized and Orthogonalized Impulse Response Functions

Demonstrate differences between orthogonal and generalized impulse response functions.

### Convert Between Models

Convert VARMA Model to VAR Model

Create a VARMA model, and then convert it to a pure VAR model.

### Generate Simulations or Impulse Responses

VAR Model Forecasting, Simulation, and Analysis

Use models to extrapolate the behavior of time series.

Simulate VAR Model Conditional Responses

Forecast CPI growth rates given known values of the unemployment rate using Monte Carlo simulation.

Simulate Responses Using filter

Reproduce the results of `simulate` using `filter`.

Simulate Responses of Estimated VARX Model

Estimate a multivariate time series model that contains lagged endogenous and exogenous variables and simulate responses.

Forecast VAR Model Using Monte Carlo Simulation

Generate forecasts from a VAR model using Monte Carlo simulation.

### Generate Minimum Mean Square Error Forecasts

Forecast VAR Model

Generate forecasts with error estimates.

Forecast VAR Model Using Monte Carlo Simulation

Generate forecasts from a VAR model using Monte Carlo simulation.

Forecast VAR Model Conditional Responses

Forecast responses given contemporaneous information about other response values in the forecast horizon.