Page 1 of 1
Variance Decomposition in SVAR
Posted: Thu Jul 28, 2011 10:49 pm
by WALLE
Hello,
I am trying to estimate a 3 variable SVAR of the effects of oil price shocks on macroeconomic fluctuations as in "BJØRNLAND, H. C. (2000). The dynamic effects of aggregate demand, supply and oil price shocks - a comparative study. The Manchester School of Economic Studies, 68, pp. 578–607".
I have obtained the IRF's however I would like to carry out the Variance decomposition but the procedure in the User guide seems a bit hazy I know I have to make use of the errors command but then I'm really stuck as to going about it.
************************************************************
system(model=mexicosvar)
variables d_l_mex_ip d_l_oilp_mex mex_ur
lags 1to 2
det constant
end(system)
estimate(print,resids=varresidsmex)
************************************************************
*RESTRICTIONS
dec rect lr(3,3)
dec rect sr(3,3)
input sr
. . .
0 . 0
. . .
input lr
0 . .
. . .
. . .
@ShortAndLong(sr=sr,lr=lr,masum=inv(%varlagsums), factor=b) %sigma
****************************************************************
*OBTAIN STRUCTURAL SHOCKS
@StructResids(factor=b) varresidsmex 1987:01 2010:12 strshocs
I would like help in pressing forward.
Thanks
Re: Variance Decomposition in SVAR
Posted: Fri Jul 29, 2011 1:07 pm
by TomDoan
You don't need the structural residuals to do a variance decomposition. The combination of the model and the factor matrix (B in your case) is enough.
ERRORS(FACTOR=B,MODEL=MEXICOSVAR,STEPS=# of steps)
Re: Variance Decomposition in SVAR
Posted: Tue Aug 02, 2011 9:15 pm
by WALLE
Thanks Tom

Re: Variance Decomposition in SVAR
Posted: Mon Sep 19, 2011 3:43 pm
by DALLEYNE1
Dear Tom,
I have been using the Rats replication file for the paper ,
By Bjørnland, Hilde C. and Kai Leitemo (2009): "Identifying the
Interdependence between US Monetary Policy and the Stock Market".
Journal of Monetary Economics, 56, 2009, 275-282.
The Rats file does not report the variance decomposition as reported in the original article.To generate these I made some modifications.I modified the following line:
@ShortAndLong(lr=lr,sr=sr,masum=inv(%varlagsums), factor=w) %sigma f
by adding factor=w and then I added the additional line under the impulse expression as follows:
impulse(noprint,model=model,factor=factor,results=impulses,steps=steps)
ERRORS(FACTOR=factor,MODEL=varstockp,STEPS=10)
Would this be correct?
Finally I wanted to use an error correction equation in the Var and redo the analysis but I get the result;
## VAR12. %MODELLAGSUMS can't be used with a model with ECT terms
The Error Occurred At Location 0560 of SRLRDODRAWS
Line 52 of SRLRDODRAWS
How can I avoid this.
Re: Variance Decomposition in SVAR
Posted: Tue Sep 20, 2011 9:31 am
by TomDoan
DALLEYNE1 wrote:Dear Tom,
I have been using the Rats replication file for the paper ,
By Bjørnland, Hilde C. and Kai Leitemo (2009): "Identifying the
Interdependence between US Monetary Policy and the Stock Market".
Journal of Monetary Economics, 56, 2009, 275-282.
The Rats file does not report the variance decomposition as reported in the original article.To generate these I made some modifications.I modified the following line:
@ShortAndLong(lr=lr,sr=sr,masum=inv(%varlagsums), factor=w) %sigma f
by adding factor=w and then I added the additional line under the impulse expression as follows:
impulse(noprint,model=model,factor=factor,results=impulses,steps=steps)
ERRORS(FACTOR=factor,MODEL=varstockp,STEPS=10)
Would this be correct?
That's the idea. I'm not sure where your "factor" is defined. With the full set of steps and the labels used elsewhere, it would be done with
errors(model=varstockp,steps=nsteps,factor=f,labels=shocklabels)
DALLEYNE1 wrote:
Finally I wanted to use an error correction equation in the Var and redo the analysis but I get the result;
## VAR12. %MODELLAGSUMS can't be used with a model with ECT terms
The Error Occurred At Location 0560 of SRLRDODRAWS
Line 52 of SRLRDODRAWS
How can I avoid this.
The VECM has a singularity in the matrix that must be inverted in computing
%MODELLAGSUMS, so it can't be computed that way. See the example at:
http://www.estima.com/forum/viewtopic.php?f=4&t=730
Re: Variance Decomposition in SVAR
Posted: Mon Nov 12, 2012 2:28 pm
by istiak
Dear Tom
I was following the code of DALLEYNE1 (see earlier discussion in this page, Tue Sep 20, 2011 9:31 am) to find variance decomposition in Bjørnland, Hilde C. and Kai Leitemo (2009): "Identifying the Interdependence between US Monetary Policy and the Stock Market" paper. You mentioned him that his code is correct. But I get numerous sets of variance decomposition for each variable. Each set is different. Which set of values represent the actual variance decomposition mentioned in the footnote of 11 of the original paper?
My second question is: Bjørnland et al. argue that "Lag reduction tests suggest that four lags could be accepted at the one-percent level by all tests (page-278." But when I use the code:
@varlagselect(lags=10,crit=sbc)
# gap dpi compi2 dlrsp intr
In the output window, I get:
VAR Lag Selection
Lags SBC/BIC
0 1185.6004
1 -1235.2579*
2 -1196.8841
3 -1105.7039
4 -1019.9769
5 -922.1363
6 -812.8905
7 -697.7413
8 -583.2719
9 -492.2691
10 -383.3610
So, I should use 1 rather than 4 lags. Again AIC criteria shows that I should use 2 lags. I dont know why I am getting different result from the author. Can you please show me how the authors are getting 4 lags as optimal? Thank you so much.
Re: Variance Decomposition in SVAR
Posted: Tue Nov 13, 2012 8:19 am
by TomDoan
istiak wrote:Dear Tom
I was following the code of DALLEYNE1 (see earlier discussion in this page, Tue Sep 20, 2011 9:31 am) to find variance decomposition in Bjørnland, Hilde C. and Kai Leitemo (2009): "Identifying the Interdependence between US Monetary Policy and the Stock Market" paper. You mentioned him that his code is correct. But I get numerous sets of variance decomposition for each variable. Each set is different. Which set of values represent the actual variance decomposition mentioned in the footnote of 11 of the original paper?
I edited the response above to add the shock identifiers used elsewhere so you can tell the columns apart.
istiak wrote:
My second question is: Bjørnland et al. argue that "Lag reduction tests suggest that four lags could be accepted at the one-percent level by all tests (page-278." But when I use the code:
@varlagselect(lags=10,crit=sbc)
# gap dpi compi2 dlrsp intr
In the output window, I get:
VAR Lag Selection
Lags SBC/BIC
0 1185.6004
1 -1235.2579*
2 -1196.8841
3 -1105.7039
4 -1019.9769
5 -922.1363
6 -812.8905
7 -697.7413
8 -583.2719
9 -492.2691
10 -383.3610
So, I should use 1 rather than 4 lags. Again AIC criteria shows that I should use 2 lags. I dont know why I am getting different result from the author. Can you please show me how the authors are getting 4 lags as optimal? Thank you so much.
What they're describing is done with CRIT=GTOS (General-to-specific) with SIGNIF=.01.
http://www.estima.com/forum/viewtopic.php?f=7&t=1261