Tracing a shock through a VAR with impulse responses

Today let's learn how to read a fitted VAR through impulse responses: we push one variable once, and watch what the whole system does over the next 12 quarters.

Let's take Canada's labour market. We have 84 quarters, from 1980 Q1 to 2000 Q4, published by the OECD, and three series: employment, the real wage and the unemployment rate.

A VAR, short for vector autoregression, fits one regression per series on the recent past of all the series. Fitted to these three, it gives a table of coefficients that is hard to read. Each coefficient says how one series responds to one lagged series, and the answer we want comes from all of them working together.

So we ask a concrete question instead. Suppose employment growth lands 1 percentage point above what the past of the three series predicts, in one quarter. What happens to wage growth and to the unemployment rate over the following 12 quarters?

The answer is called an impulse response, and there are only three actions in it.

The three boxes above are the whole method. Everything from here on carries them out on the Canada data.

The three-series VAR for Canada's labour market

Let's start by building the data and the model, because every response we compute will come from them.

The series are in the Canada data of the vars package. e is employment and rw is the real wage. Each is stored as 100 times its natural log, so a change of 1 in either is about a 1 percent change. U is the unemployment rate in percent, so a change of 1 is 1 percentage point.

We model quarterly changes rather than levels, using diff(), and we name the three changed series d_emp, d_wage and d_unemp. The roots printed at the end of the code show why.

A VAR(2) is three regressions, one per series. Each one regresses a series' change on the last 2 quarters of all three series, plus a constant. That is 7 terms per equation and 3 equations, so 21 coefficients.

Press Run.

RInteractive R
# Build the quarterly changes, fit a VAR(2) and check its stability library(vars) data(Canada) levels_df <- Canada[, c("e", "rw", "U")] # employment, real wage, unemployment rate d <- diff(levels_df) # quarterly changes colnames(d) <- c("d_emp", "d_wage", "d_unemp") dim(d) #> [1] 83 3 round(apply(d, 2, sd), 3) #> d_emp d_wage d_unemp #> 0.584 1.044 0.435 fit <- VAR(d, p = 2, type = "const") sum(sapply(fit$varresult, function(eq) length(coef(eq)))) #> [1] 21 round(roots(fit), 3) #> [1] 0.662 0.662 0.476 0.476 0.217 0.217 fit_levels <- VAR(levels_df, p = 2, type = "const") round(roots(fit_levels), 3) #> [1] 0.996 0.854 0.781 0.781 0.049 0.010 round(log(0.5) / log(max(roots(fit_levels)))) #> [1] 161

  

There are 83 quarterly changes, and the VAR uses 81 of them because the first 2 quarters only supply lags. The standard deviations of the 3 changes are 0.584, 1.044 and 0.435: in percent for d_emp and d_wage, and in percentage points for d_unemp.

roots() returns six numbers, one for each pattern of movement in the system. Each is the factor by which that pattern shrinks every quarter (formally, the moduli of the eigenvalues of the VAR's companion matrix). When all of them are below 1, the VAR is stable: a disturbance fades away.

For the changes, the largest modulus is 0.662, so a disturbance loses about a third of its size each quarter. For the levels, it is 0.996. A disturbance would keep 99.6% of its size each quarter, and the last line shows it would take about 161 quarters to halve. That is why the responses in this lesson come from the changes.

The lag order 2 is a choice we state here, not one a criterion picked for us.