This guided tour contains mathematical formulas and/or Greek symbols and are therefore best viewed with Internet Explorer, Opera or Google Chrome, because other web browsers (in particular Firefox) may not display the "Symbol" fonts involved. For example, "b" should be displayed as the Greek letter "beta" rather than the Roman "b". If not, reload this guided tour in Internet Explorer, Opera or Google Chrome, or make one of them your default web browser.
In this guided tour I will explain how to conduct vector autoregression (VAR) innovation response analysis, including structural vector autoregression innovation response analysis.
The theory involved in explained in my lecture notes on vector time series and innovation response analysis, but here I will review the main ideas, based on the seminal papers:
Xt = c0 + C1Xt-1 + ..... + CpXt-p + Ut ,
C(L)Xt = c0 + Ut,
is a matrix-valued lag polynomial, with L the lag operator:
The process Xt
is strictly stationarity if det[C(z)] has all its roots outside
the complex unit circle. Then C(L) is invertible, i.e., there
parameter matrices Dj, with
C(L)-1 = åj³0DjL j.
Hence, the process Xt has a stationary MA(¥) representation:
Xt = m + åj³0DjUt-j,
Note that E[Xt] = m
Since the Ut's
are i.i.d. with E[Ut] = 0, it follows now that
E[Xt+m|Ut] - E[Xt+m] = DmUt .
The latter is
the basis for innovation response analysis, i.e.,
Ut = Det,
where D is a lower triangular matrix such that
S = DD'.
is i.i.d. Nk[0,Ik]. The components
..... ,ek,t of et are uniquely associated
to the corresponding components of Ut. Consequently,
we can now interpret e1,t, ..... ,ek,t
as the actual innovations, and moreover we may consider them as sequential
policy shocks: at time t a shock
E[Xt+m|ej,t = 1] - E[Xt+m] = Dmdj for m = 0,1,2,3,.....,
where dj is column j of D, and thus the response of Xi,t to a unit shock in ej,t is given by
ri,j(m) = E[Xi,t+m|ej,t = 1] - E[Xi,t+m] = di,m'dj for m = 0,1,2,3,.....,
where di,m' is row i of Dm.
B.Xt = a0 + A1Xt-1 + ..... + ApXt-p + et,
where et is i.i.d. Nk[0,Ik]. The matrix B represents the contemporaneous relations between the components of Xt. This structural VAR(p) model is related to the non-structural VAR(p) model
Xt = c0 + C1Xt-1 + ..... + CpXt-p + Ut ,
Xt = B-1a0 + B-1A1Xt-1 + ..... + B-1ApXt-p + B-1et,
Hence, c0 = B-1a0, Cj = B-1Aj for j = 1,..,p, and Ut = B-1et. The latter reads as
B.Ut = et.
Therefore, effectively the matrix B of structural parameters links the nonstructural innovations Ut to the structural innovations et.
The main difference
with the non-structural approach is the way the variance matrix S
of Ut is decomposed, i.e., instead of writing
Given S, and taking into account the symmetry of S, the equality B'B = S-1 is a system of (k + k2)/2 nonlinear equations in the k2 elements of B. Therefore, in order to solve this system, one has to set at least (k2 - k)/2 off diagonal elements of B to zeros, similarly to classical simultaneous equation systems. This is where economic theory comes into the picture: The zeros in B are exclusion restrictions prescribed by economic theory.
Note that even if we reduce the system B'B = S-1 to (k + k2)/2 equations in (k + k2)/2 unknowns, there is no guarantee that there exists a solution, because the equations involved are quadratic. But assuming that we have spread the zeros in B such that a solution exists, the structural innovation response of Xi,t to a unit shock in ej,t is given by
where again di,m' is row i of Dm, and bj is now column j of B-1.
estimates a structural VAR model in three steps. First, the non-structural
VAR is estimated by maximum likelihood. Next, given the estimated variance
S and the specification
of the matrix B, EasyReg will try to solve the nonlinear equations
Note that direct maximum likelihood estimation of the structural VAR model (as some other econometric software packages do) is not advisable because the likelihood function is highly nonlinear in the non-zero elements of B, and therefore you may get stuck in a local maximum.
The data are taken from the EasyReg database, namely the following quarterly data for the US:
Since VAR innovation response analysis assumes normal errors of the VAR, and the variables involved are all positive valued, transform them by taking logs, using the 'Transform variables' option via Menu > Input:
The last three variables are likely nonstationary. Therefore, take them in first
differences, using the option Menu > Input > Transform variables > Time series transformations.
Then select the variables in
for t = 1,2,...,142, from quarter 1959.2
Open Menu > Multiple equations models > VAR innovation response analysis, select the variables in the VAR in the above order, and click "Selection OK". Then the following window appears.
I will not select a subset of observations. Thus click "No" and then "Continue":
This window is only for your information. Click "Continue":
In the introduction above I have discussed only a VAR model with intercept
parameter vector c0. However, if Xt
(= z(t) in EasyReg) is stationary around a deterministic function of time,
Xt = C0d(t) + C1Xt-1 + ..... + CpXt-p + Ut ,
where d(t) is a vector of deterministic functions of time
t, and C0
The default specification of d(t) is d(t) = 1. Other options are d(t) = (1,t)', seasonal dummy variables (only in the case of seasonal data, of course), and Chebishev time polynomials. The latter can be used to capture nonlinear time trends. The Chebishev time polynomials have been used in my paper
It is logically impossible that the (transformed) data contain a linear time trend, because that would imply that the expectation of some of the variables involved converge to plus or minus infinity.
Since the data are quarterly data, and because it is not clear whether the data are seasonally adjusted, I recommend to include in first instance seasonal dummy variables, next to the constant 1. Whether seasonal dummy variables are needed can be tested. Thus click "Seasonal dummies":
Note that only three quarterly dummies are included next to the contant 1, because the four seasonal dummies add up to 1 and would therefore be perfectly multicollinear with 1.
Now click "d(t) is OK":
There are various ways to determine the order p of the VAR(p) model
Xt = C0d(t) + C1Xt-1 + ..... + CpXt-p + Ut.
Via this window you can determine p automatically by one of three information criteria:
Another way to determine p is through testing the joint significance of the parameters in the matrices Cj. I will consider this later.
I have chosen 8 as the upper bound of p. Now click "p OK":
In view of these results, I have chosen p = 2.
This window is only for your information. Click "Continue".
This window enables you to impose Granger-causality restrictions on the VAR. See my lecture notes on vector time series and innovation response analysis. Granger-causality will be discussed below by a separate example. Thus, click "Continue".
Since each equation in the VAR model
Xt = C0d(t) + C1Xt-1 + ..... + CpXt-p + Ut, t = p+1,...,n,
has the same right-hand side variables, and there are no parameter restrictions imposed, the maximum likelihood estimators of the parameters in the matrices Cj for j = 0,1,...,p are the same as the OLS estimators. Thus, click "OLS estimation" first. After EasyReg is done with OLS estimation, the button "FIML estimation" will be enabled. FIML stands for Full Information Maximum Likelihood. Given the vectors Rt of OLS residuals, the maximum likelihood estimator of the variance matrix S of the VAR error vector Ut is
Sn = (n-p)-1åp+1 £ t £ nRtRt',
which is decomposed as
where Dn (= L in EasyReg) is a lower triangular matrix. We need FIML in order to compute the variance matrix of the non-zero elements of Dn, which in its turn is needed to compute the standard error bands of the innovation responses. Thus, click "FIML estimation" when it becomes enabled. Then the following window appears.
The variables L(.,.) are the non-zero elements of the lower triangular matrix Dn (= L).
You can now test the joint significance of any subset of parameters of the VAR. First, I have tested the joint significance of the parameters of the seasonal dummy variables: Double-click the seasonal dummies (note that each of the four equations contains three seasonal dummy variables, so that you have to double-click all 12 seasonal dummy variables), and then click "Test joint significance":
The test involved is the Wald test of the null hypothesis that all the coefficients of the seasonal dummy variables are zero. The asymptotic null distribution is c2 with 12 degrees of freedom. Clearly, the null hypothesis involved is not rejected at any conventional significance level.
In view of this result, we may now respecify and re-estimate the VAR without seasonal dummy variables. However, I have not done that.
If you click "Again", you can conduct more tests.
Next, I have tested whether the VAR order p can be reduced from p = 2 to p = 1, by testing whether the 16 coefficients corresponding to the variables with lag 2 (i.e., the elements of the matrix C2) are jointly zero.
Clearly, the null hypothesis involved is rejected. Therefore I will adopt the initial choice p = 2.
Note that this procedure is an alternative way to determine the VAR order p.
Given an initial value of p for which you are convinced that the actual
VAR order does not exceed this initial value,
test whether the elements of the matrices Cj for
Xt = C0d(t) + C1Xt-1 + ..... + CpXt-p + Ut
are jointly zero, and take as the new p the largest value of q for which this hypothesis is rejected.
Now click "Continue". Then the following windows appears.
Let us conduct non-structural VAR analysis first. After you are done with that, you will return to this window so that you can conduct structural VAR analysis. The same applies the other way around.
You have to choose the number of periods ahead (the innovation response horizon) for which you want to display the innovation responses. The minimum value is 10. Here I have chosen 40, so that the innovation responses are displayed over a period of 10 years.
Click "Start" to compute the innovation responses together with their standard errors.
You will have the option to write the numerical values of the innovation responses with their standard errors to the output file OUTPUT.TXT, but in general there is no purpose in doing this. Thus, click "Continue".
The contribution of the innovation in variable i to the h-step ahead forecast error of variable j is the sum of the squared responses of variable j to a unit shock in the innovation of variable i. In this window the relative contributions of each variable i to the forecast error variance of variable j are presented. This procedure is known as "variance decomposition".
The solid curve is the response of the inflation rate to a unit shock in the innovation of the log of the federal funds rate. You see that in the first three quarters the response is significantly positive, as the two-times standard error band is above the horizontal axis, and then dies out quickly to zero. This phenomenon is known as the price puzzle. Since the FED raises the federal funds rate in order to curtail inflation, one would expect that the response of inflation to a unit shock in the innovation of the federal funds rate is negative rather than positive.
This picture is the response of the money growth rate to a unit shock in the innovation of the log of the federal funds rate. This pattern is what you would expect: If borrowing money is made more expensive, the demand for money will decrease.
When you click "Done", EasyReg will jump back to the first window of module VAR (where you select the variables).
In this demonstration of structural VAR innovation response analysis I will use the same four variables, in a VAR(2) model. However, I have now excluded the seasonal dummy variables, because their coefficients were not jointly significant. The specification and estimation procedure is similar to the previous case, until you reach the following window:
The matrix A in the description of the structural VAR is a matrix of structural parameters with 1 as diagonal elements, and the matrix C is a diagonal matrix. These matrices are related to the matrix B in the structural model
B.Xt = a0 + A1Xt-1 + ..... + ApXt-p + et,
used in the previous discussion of structural VAR analysis by the equality
Recall that the structural model relates the nonstructural VAR errors Ut to the structural VAR errors et by the relationships
In the following four windows the non-zero elements of each row of B are specified.
The first element on row 1 of B is always non-zero. The remaining three non-zero elements are determined by double-clicking the correponding components of Ut. In this example I will choose the first row of B to be (b(1),0,0,0), hence I will not double-click anything, but just click "Equation OK".
When you click "Equation OK", (0,b(2),b(3),b(4)) will be chosen as the second row of B.
When you click "Equation OK", (b(5),0,b(6),0) will be chosen as the third row of B.
Finally, when you click "Equation OK", (0,0,0,b(7)) will be chosen as the fourth row of B. Then the matrix B is:
æb(1) 0 0 0 ö ç0 b(2) b(3) b(4)÷ çb(5) 0 b(6) 0 ÷ è0 0 0 b(7)ø
Note that this specification is not intended to be a serious economic specification, but is chosen merely as an example.
EasyReg will now try to solve the equation system
What you see here are the equations of the system
The non-zero parameters in B are solved analytically. If EasyReg cannot solve the system analytically, then you will likely have an identification problem.
The equations in the previous window indicated by (*) are testable hypotheses. In this example the null hypothesis that these equations hold is rejected, hence we should respecify the matrix B. However, since this is only a demonstration of structural VAR analysis, I will continue.
Click "Method 2". Then the log-likelihood will be maximized using the simplex method of Nelder and Mead, starting from the non-structural parameter estimates and the solutions of the b(.)'s.
Restart the simplex iteration until the log-likelihood does not change anymore:
When you click "Done with Simplex iteration" the following window appears.
The rest of the structural VAR innovation response analysis is now similar to the non-structural case.
Consider a bivariate time series process
i.e., of all functions of the past of Xt, say
Now suppose that
Then the past of the process X2,t does not contain information that
can be used to improve the forecast of X1,t. If so, it is said
If Xt is a VAR(p) process:
Xt = c0 + C1Xt-1 + ..... + CpXt-p + Ut ,
and X2,t does not Granger-cause X1,t, then the matrices Cj for j = 1,...,p are lower-triangular, because the coefficients of the lagged X2,t in the VAR are zero.
Retrieve two annual time series from the EasyReg database, namely
You see that these time series have quite a few similar patterns. The reason is that
due to the size of the US economy the
US GDP growth rate may be considered as a proxi for the world economic growth rate.
Sweden is a small country and its economic performance heavily depends on exports. Therefore,
the US GDP growth rate will affect the Swedish national income growth rate,
but not the other way around. In other words, one may expect that
It is clear from the plot that there is no time trend in these series, and you see in
this window that the average
I have chosen p = 6 as the initial value of p. The three information criteria all indicate that the actual value is p = 1. Therefore, I have chosen p = 1.
The coefficient of one year lagged
In order to impose this restriction on the VAR(1), click "Respecify VAR", select the two variables again, and choose p = 1:
The VAR(1) involved is now of the form
æa 0ö èb cø
say, which corresponds to the pattern
1 0 1 1
Therefore, click "Column Up", and then "Change pattern":
Click "OLS estimation" in order to get initial estimates. Since there are parameter
restrictions imposed on the VAR, OLS is no longer efficient. Therefore, after OLS is done, the
button "SUR estimation" becomes enabled. SUR stands for Seemly Unrelated Regression.
SUR estimation of the restricted VAR(1) model
In each SUR estimation step j the matrix
You can now conduct joint significance tests.
Click "Continue", choose "Non-structural VAR", and innovation response horizon = 10:
On the other hand, a unit shock in the innovation of
In principle it is possible to include exogenous variables in a VAR model, next to determinsitic variables such as trends, and conduct innovation response analysis via EasyReg. How to do that is explained in PDF file VARX.PDF.