Page 1 of 1

SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Tue Aug 15, 2017 9:21 am
by bgauchan

I am using Blanchard & Quah (1989) long run restrictions on structural bivariate model with output growth (gdp_growth) and inflation (gdp_deflator) as the variables. The restrictions imposed is that supply shock (structural innovation relation to output growth) will have long term impact on both variables while the demand shock (structural innovation relating to inflation) will have no long run impact on output growth. But both shocks will have long run impact on price. So instead of defining A and B matrix in this case, I presume that I shall define long term pattern (matrix_lr) with NA,0,NA,NA elements. The eviews will then give me elements of matrices A and B which I have used to create matrix_a and matrix_b. Similarly, error terms e1 and e2 are generated using Make Residuals command after running Unrestricted VAR with lag 1. I have attached an eviews file that contains 9 worksheets, the first being the panel data followed by separate worksheet for each South Asian countries. For our case, we will take the example of Pakistan (PAK):

My queries are as follows:

1. I am using Eview 9 and please confirm if the steps followed so far in eviews are correct or not.
2. If it is correct, please guide me on how to generate structural shocks u1 (supply shock corresponding to output) and u2 (demand shock corresponding to inflation) in eviews from e1, e2 and matrices A & B. Please provide navigation instead of command as I am not good at latter;
3. The purpose of the above exercise is to compare symmetries of shocks across countries in the region to assess suitability for optimum currency area (Bayoumi & Eichengreen 1994). Please guide if the correlation of supply shock and demand shock across countries can be generated from eviews?
4. How to calculate size of disturbances (defined as long run effect on output from the IRF for supply shocks and sum of the first year's impact on output and prices for demand shocks) and speed of adjustment (response after 2 years as a share of the long run effect) for each country?
x. Can we run SVAR on panel data? I compiled all the data in a panel form thinking that Eviews will run SVAR on panel data thereby simplifying the process and saving time and efforts.

Your guidance in addressing above issues would be highly appreciated.

Best regards.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Tue Aug 15, 2017 10:01 am
by EViews Matt

1) This seems correct for a BQ setup.
2) It sounds like you want to generate the impulse responses, which EViews can do for you. With your VAR object open go to View -> Impulse Responses... You can adjust the parameters of the impulse responses, and make sure that on the "Impulse Definition" tab the "Structural Decomposition" option is selected. When you click the "OK" button EViews will graph the impulse responses.
3) You would have to save the impulse responses to perform a correlation analysis. Saving the impulse responses can only be performed via commands, see
4) Again, this type of analysis would have to be done via commands or an EViews program.
5) No, you'll need your data for different countries in separate series.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Thu Aug 17, 2017 1:07 am
by bgauchan
Many thanks for your prompt response. Much appreciated.

1. Kindly guide me how to get tabular value of shocks (u) just like the way we are getting the tabular value of errors (e). I need this to find correlation of symmetries of shocks across different countries. I will use excel to find correlation once the shocks are extracted;
2. How shall I interpret/co-relate the elements of A and B matrix that was produced automatically by the system with the elements of long term pattern (NA, 0, NA, NA) that we have defined as long run identification restriction;
3. Kindly elaborate the significance of choosing among different decomposition methods: Residual, Cholesky & Structural decomposition and how do they impact our results?

Best regards.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Thu Aug 17, 2017 10:40 am
by EViews Matt
I may have misinterpreted what you want earlier. To clarify, do you want the impulse responses to shocks or the structural residuals? Let me answer your questions assuming the latter, that you want the structural residuals.

As you know you can generate a table of the VAR residuals (errors) via View -> Residuals -> Spreadsheet. You can do the same for the VAR structural residuals (shocks) via View -> Structural Residuals -> Spreadsheet. To generate the shocks, you much chose the relationship between the shocks and the errors. In effect, you're choosing an assumption about that relationship, which is necessary because the relationship cannot be determined directly from the underlying data (the SVAR identification issue). More specifically, in the error/shock relation e_t = S * u_t you're choosing the matrix S. Let me briefly describe the options for S:

  1. Diagonal Factor - S is diagonal and each element on the diagonal is the standard deviation of the corresponding error.
  2. Cholesky Factor - S is lower triangular. Also known as a recursive ordering, this implies that the endogenous variables can be ordered such that the first shock affects all variables, the second shock affects variables 2 through k, the third shock affects variables 3 through k, etc.
  3. Generalized Impulses Factor - (If I remember correctly) S is the residual covariance matrix with each column scaled by the reciprocal of the standard deviation of the corresponding error.
  4. Structural Decomposition - S is the S matrix determined by the SVAR estimation.
Choosing among the above options, or using a user-defined factor, is a matter of economic theory. You have to make an assumption about how your system works.

Regarding the A and B matrices, A and B are a factorization of the matrix S. When you make long-run restrictions on matrix F, you're also restricting S, since Phi * S = F. There isn't enough information to uniquely decompose S into A and B, so EViews has to make an assumption. The assumption is that A = I, which means that B will be Phi^1 * F.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Thu Aug 17, 2017 11:24 am
by bgauchan
Many thanks again and it is getting much clearer now. For the measurement of structural shocks, I still didn't find the navigation you have mentioned. I spent most of the day in manually doing it (for only one country so far) in excel by solving simultaneous equations of A*e1 = B*u1 & A*e2=B*u2 but I am not sure if I have done it correctly or not. Please check my eviews file and see if the navigation is there (eg. country Pakistan). I could only see for residual. best regards.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Thu Aug 17, 2017 11:47 am
by EViews Matt
Forgive me, I wasn't considering that you're using EViews 9 instead of EViews 10...

Here's some code that works with your PAK example. The code generates shock series u1 and u2 based on the structural decomposition (option 4 above).

Code: Select all

' Create individual residual series.
svar_01.makeresid e1 e2

' Group the residual series together.
group e e1 e2

' Copy the residuals into a matrix
matrix e_m
stomna(e, e_m)

' Define the short-term impulse response matrix (using the structural decomposition for now, but can be changed).
matrix S = @inverse(svar_01.@svaramat) * svar_01.@svarbmat

' Transform the errors into shocks.
matrix u_m = e_m * @inverse(@transpose(S))

' Group and copy the shocks into individual series.
series u1
series u2
group u u1 u2
mtos(u_m, u)

' Delete temporary objects.
delete e_m u_m

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Sun Aug 20, 2017 1:31 am
by bgauchan
1. Kindly bear with me as I was not able to generate structural shocks by running the command you have sent. I would instead appreciate if you can kindly solve it for Pakistan and re-post the attachment with commands so that I can replicate it for other countries in different worksheets.

2. Regarding relations among matrices A, B, S and F I would like to acquire further clarification by following up from your last reply. In our example for Pakistan, I imposed long run restriction (NA,0,NA,NA) through matrix_lr and the eviews came up with the result (0.027657, 0, -0.007112, 0.050912) in the form of [c(1), 0, C(2), C(3)]. Please clarify whether it corresponds to matrix S or matrix F in accordance with your definition. I assume it is F as S won't be shown in eviews.

3. You have mentioned the relation between S and F in the form of Phi * S = F. Please clarify what is Phi and where it comes from? With Phi, I suppose I can calculate S. Regarding the assumption that EViews makes namely A = I, such that B will be Phi^1 * F; kindly clarify the notation Phi^1 and how it relates to our results in the case of Pakistan. Does this Phi^1 help us to solve the equation relating to matrix B with elements (0.01897, -0.000992, -0.015252, 0.041299) and matrix F with elements (0.027657, 0, -0.007112, 0.050912) in our Pakistan example? By attaining clarity on this, I am trying to understand the interrelation among matrices A, B, S and F.

4. Can we safely deduce that the significance of identifying restrictions through different matrices (A, B, S, F) is essentially to define relationship between residuals and corresponding structural shocks given that the coefficients of variables remain the same with or without whatever matrices? I found that the relationship among the variables remains unchanged for same lag irrespective of order and matrices.

Many thanks.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Mon Aug 21, 2017 9:39 am
by EViews Matt
(1) Those commands are exactly what I used to generate shocks for the PAK page. When you try to run the commands (easiest if copied and pasted into a program), what error(s) do you encounter?

(2) The long-run restrictions apply to the F matrix. In EViews 9 and earlier F was called the C matrix and there was no explicit mention of the S matrix. The current SVAR documentation for EViews 10 has a more detailed description of how these matrices relate to one another.

(3) I mistype Phi, that should've been Psi. Psi is also explained in the documentation, but the short answer is that it's a term that translates short-run behavior into long-run behavior. Psi is calculated from the estimated VAR parameters, specifically the matrices that multiply the lags of the endogenous variables, what in the VAR and SVAR documentation are referred to as A_1, A_2, ..., A_p. I mistype Phi^1, that should've been Psi^-1, the inverse of the Psi matrix. When you specify long-run restrictions, EViews estimates F. Using the relation S = Psi^-1 * F, EViews directly calculated S. A and B are related to S via A^-1 * B = S, but A and B cannot be determined without making additional assumptions. EViews assumes that A = I, thus B = S = Psi^-1 * F. Therefore, Psi is necessary to calculate S and subsequently B.

(4) Yes, you're determining the relationship between errors and shocks. In cases where A = I, you won't see any changes in the relationships among the variables of the VAR if you rewrite the VAR in structural form (the first form listed in the SVAR documentation). If A != I, you would see some changes, but that's not the scenario you're in.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Thu Sep 14, 2017 6:31 am
by bgauchan
1. Many thanks, I presume that I was able to correctly extract structural shocks: supply shock (denoted by ser01 in eviews) and demand shock (denoted by ser02) from the eviews program that you have written for me. Accordingly I have calculated pairwise correlation of shocks to estimate symmetries of shocks for the countries in the region (excel file attached)

2. Now having successfully estimated structural shocks from eviews, I would like to advance further in my empirical studies in decomposing each country's shocks into common component and idiosyncratic component using space state model to find out how much of the shock is related to common factor and how much is specific to a given country. This is important because the simple correlation of structural shocks will not provide information about the factors that affect the co-movement of shocks between economies. The assumptions made are that both common and country specific components are subject to stochastic shocks and they are orthogonal. The state space model is estimated using Kalman filter to obtain model coefficients. Kindly assist me doing it in eviews.

3. I have attached earlier eviews file that now includes separate work files for both supply shocks and demand shocks under two lags processes.

Best regards.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Sun Oct 01, 2017 4:51 am
by bgauchan
I am still waiting for your kind response...

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Mon Oct 02, 2017 1:21 pm
by EViews Matt
I'm afraid I don't have any experience with EViews' state space models. Hopefully another user can assist you.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Sat Oct 14, 2017 7:36 am
by bgauchan
I will post separately for seeking help on state space model.

Having completed estimation of SVAR with two variables (gdp, gdp_deflator), I have now started working on multivariate SVAR (three variables: gdp, reer and cpi) to extend my empirical works. I have noted cointegration among these three variables as all of them are I(1). So I selected VECM to estimate the result. However, I could not proceed further into SVAR estimation given that the system provides following message: "Not yet implemented in this version for VECs or BVARs. Currently only for unrestricted VARs." message. I am using 9.0.

Kindly advise.

Re: SVAR with long run restriction (Blanchard & Quah 1989)

Posted: Mon Oct 16, 2017 10:24 am
by EViews Matt
I'm afraid SVECs are not yet supported by EViews.