Home | Command Reference | Run Example

VAR Model Command

The VAR_MODEL command estimates a vector autoregression model across a list of time series. Each series is modeled using its own lagged values and the lagged values of every other series in the system.

Example

VAR_MODEL(LIST(UNRATE,U6RATE,WTISPLC),6)

This example estimates a 6-lag VAR model using the unemployment rate, U-6 unemployment rate, and crude oil prices.

Syntax

VAR_MODEL(seriesList, lags)

The input should be a list of time series and a lag length. For each series in the list, the model estimates a separate regression equation using an intercept and lagged values of all series in the system.

Output

The command produces a VAR model panel including:

How to Read the Model

A VAR model treats all series as part of a dynamic system. Instead of choosing one dependent variable and one set of explanatory variables, each series is explained by the recent history of the entire system.

For example, in a model with unemployment, U-6 unemployment, and oil prices, the unemployment equation may depend on past unemployment, past U-6 unemployment, and past oil prices. The U-6 equation and oil-price equation are estimated the same way.

Shock Analysis

After the model is fitted, it can be used to simulate future paths. A shock may be applied to one variable, and the model can estimate how that disturbance propagates through the other variables over time.

EXTRACT(VAR_MODEL(LIST(UNRATE,U6RATE,WTISPLC),6), shockdiff:0:2:20)

This example estimates the difference between a baseline forecast and a shocked forecast, where the third series receives a positive shock of 20 units. The resulting chart shows the estimated effect of that shock on the first series.

Interpretation

VAR models are useful for studying feedback relationships, lagged responses, and dynamic interactions among economic or financial time series. They are especially helpful when no single series should be treated as purely independent.

A close fitted chart suggests that the lag structure captures much of the historical movement in that series. Shock charts help illustrate whether a disturbance fades quickly, persists, or spreads across the system.

Typical Use Cases

Notes

The VAR model is linear and lag-based. The selected lag length matters, and long simulations should be interpreted carefully when the system is highly persistent. As with all time-series models, results should be evaluated with attention to data frequency, sample size, stationarity, and economic reasoning.

Run this example in RainbowStats