How to impose short and long run restrictions in SVAR

Questions and discussions on Vector Autoregressions
calvarez
Posts: 5
Joined: Wed Mar 09, 2011 12:12 pm

How to impose short and long run restrictions in SVAR

Unread post by calvarez »

Hi, I intend to estimate a 3 variable SVAR in order to compute a sacrifice ratio. I already did this for 2 variables using the Blanchard-Quah decomposition and was fairly simple. But I don´t know how to do this calculations for a 3 variable SVAR (output, inflation and a real interest rate) becouse this calculation implies both short and long run restrictions. One restriction is given by the BQ restriction that an aggregate demand shock have no permanent effects on output (this restriction identifies the aggregate supply shock). The next restriction consists in assuming that monetary policy has no contemporaneous effect on output (this restriction allows to discriminate between IS and LM shocks). I would really appreciate your help. An example would be very usefull. Thanks in advance.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: How to impose short and long run restrictions in SVAR

Unread post by TomDoan »

calvarez wrote:Hi, I intend to estimate a 3 variable SVAR in order to compute a sacrifice ratio. I already did this for 2 variables using the Blanchard-Quah decomposition and was fairly simple. But I don´t know how to do this calculations for a 3 variable SVAR (output, inflation and a real interest rate) becouse this calculation implies both short and long run restrictions. One restriction is given by the BQ restriction that an aggregate demand shock have no permanent effects on output (this restriction identifies the aggregate supply shock). The next restriction consists in assuming that monetary policy has no contemporaneous effect on output (this restriction allows to discriminate between IS and LM shocks). I would really appreciate your help. An example would be very usefull. Thanks in advance.
For a three variable model, you'll need one more restriction to exactly identify the model. As you've described it, you're underidentified. In the inputs for the ShortAndLong procedure, so far your inputs are:

Code: Select all

dec rect lr(3,3) sr(3,3)
input lr
 0 . .
 . . .
 . . .
input sr
 . 0 .
 . . .
 . . .
@ShortAndLong(lr=lr,sr=sr,masum=phiinv) %sigma f
where variable 1 is output, shock 1 is intended to be AD and shock 2 is monetary policy. In order for the shocks to be identified, you need one more restriction on either of those shocks (one more zero in either column 1 or in column 2). That's the result from Rubio-Ramirez, J.F., D.F. Waggoner, and T. Zha (2010): “Structural Vector Autoregressions: Theory of Identication and Algorithms for Inference,” Review of Economic Studies, Vol. 77, No. 2, pp. 665–696
calvarez
Posts: 5
Joined: Wed Mar 09, 2011 12:12 pm

Re: How to impose short and long run restrictions in SVAR

Unread post by calvarez »

Hi Tom! Thank you very much for your reply. I made the estimations based on your answer but I have one doubt. The impulse response of output for a monetary policy shock is not diferente from zero according to the confidence bands for most of the period considered (20 quarters). In this case, should I conclud therefore that there is no cost asociated to monetary polycy actions. Should I mention that the sacrifice ratio computed in this way (in fact -1.06) has the particualrity that the irf'S are not differente from zero. What do you think? Thanks in advance.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: How to impose short and long run restrictions in SVAR

Unread post by TomDoan »

calvarez wrote:Hi Tom! Thank you very much for your reply. I made the estimations based on your answer but I have one doubt. The impulse response of output for a monetary policy shock is not diferente from zero according to the confidence bands for most of the period considered (20 quarters). In this case, should I conclud therefore that there is no cost asociated to monetary polycy actions. Should I mention that the sacrifice ratio computed in this way (in fact -1.06) has the particualrity that the irf'S are not differente from zero. What do you think? Thanks in advance.
Yes, you would conclude that that shock seems to have no clear effect on output. Whether what you have isolated is actually a monetary supply shock is another question.
WALLE
Posts: 11
Joined: Thu Jul 21, 2011 12:24 pm

Re: How to impose short and long run restrictions in SVAR

Unread post 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 am using a combination of long and short run restrictions. For the LR restriction, I'm using the Blanchard and Quah Approach. The 3 structural shocks are agg dd, oil shocks and agg supply. I follow the BQ idea with regard to long run restrictions however real oil price shocks to affect output in the long run and no restrictions are placed on possible short-run effects on output or unemployment. To complete identification, the other two restrictions are that the contemporaneous effects of demand and supply shocks on real oil prices are zero, and only oil price shocks will contemporaneously affect oil prices.

I have proceeded as thus after the unit root and laglength procedures using the following:

system(model=norwaysvar)
variables d_l_nor_gdp d_l_oilp_nor nor_ur
lags 1
det constant
end(system)

estimate(print,resids=varresids4)
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

@StructResids (factor=b) varresids4 start end v

I get results for the VAR and 3 residuals but then get the following when trying to obtain the structural residuals before moving on to the IRFs and all.

## SX22. Expected Type VECTOR[SERIES[REAL]], Got RECTANGULAR[REAL] Instead
>>>>tResids (factor=b) <<<<

I am a RATSOOKIE just bought the RATS software last week and would really appreciate any help

Thanks
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: How to impose short and long run restrictions in SVAR

Unread post by TomDoan »

WALLE wrote: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 am using a combination of long and short run restrictions. For the LR restriction, I'm using the Blanchard and Quah Approach. The 3 structural shocks are agg dd, oil shocks and agg supply. I follow the BQ idea with regard to long run restrictions however real oil price shocks to affect output in the long run and no restrictions are placed on possible short-run effects on output or unemployment. To complete identification, the other two restrictions are that the contemporaneous effects of demand and supply shocks on real oil prices are zero, and only oil price shocks will contemporaneously affect oil prices.

I have proceeded as thus after the unit root and laglength procedures using the following:

system(model=norwaysvar)
variables d_l_nor_gdp d_l_oilp_nor nor_ur
lags 1
det constant
end(system)

estimate(print,resids=varresids4)
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

@StructResids (factor=b) varresids4 start end v

I get results for the VAR and 3 residuals but then get the following when trying to obtain the structural residuals before moving on to the IRFs and all.

## SX22. Expected Type VECTOR[SERIES[REAL]], Got RECTANGULAR[REAL] Instead
>>>>tResids (factor=b) <<<<

I am a RATSOOKIE just bought the RATS software last week and would really appreciate any help

Thanks
You have a stray space in the StructResids procedure. Close up the gap before the (factor=b):

@StructResids(factor=b) varresids4 start end v
WALLE
Posts: 11
Joined: Thu Jul 21, 2011 12:24 pm

Re: How to impose short and long run restrictions in SVAR

Unread post by WALLE »

:D Thanks Tom,

I guess I really am a rookie. I have obtained that and presently I am trying to obtain the Impulse responses and following the User guide, I came up with the following code


CALENDAR(M) 1987:1
DATA(FORMAT=XLS,ORG=COLUMNS) 1987:01 2010:12 mex_ur mex_ip mex_inf mex_cpi mex_exr oilp_wti
************************************************************************
*DESCRIPTIVE/TRANSFORMATIONS
table
statistics mex_ur
SET L_MEX_IP = LOG(MEX_IP)
statistics l_mex_ip
set oilp_mex = oilp_wti*mex_exr/(mex_cpi)
SET L_OILP_mex = LOG(OILP_mex)
statistics l_oilp_mex
SET D_L_MEX_IP = L_MEX_IP-L_MEX_IP{1}
SET D_L_OILP_MEX = L_OILP_MEX-L_OILP_MEX{1}
statistics d_l_mex_ip
**************************************************************
*LAG LENGTH SELECTION
@varlagselect(lags=8, crit=sbc)
# d_l_mex_ip d_l_oilp_mex mex_ur
@varlagselect(lags=8, crit=aic)
# d_l_mex_ip d_l_oilp_mex mex_ur


compute neqn = 3
compute nlags = 3
compute nsteps = 24
**********************************************************
*ESTIMATE SVAR
system(model=mexicosvar)
variables d_l_mex_ip d_l_oilp_mex mex_ur
lags 1 to nlags
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
****************************************************************
*IMPULSE RESPONSES
compute implabel=||$
"Industrial Production",$
"Oil prices",$
"Unemployment rate"||
estimate(noprint)
****************************************************************
@VARIRF(model=mexicosvar,steps=nsteps,$
varlabels=implabel,page=byshocks)
@VARIRF(model=mexicosvar,steps=nsteps,$
varlabels=implabel,page=byvariables)
***************************************************************
declare rect[series] impblk(neqn,neqn)
declare vect[series] scaled(neqn)
declare vect[strings] implabel(neqn)

***************************************************************
*GRAPHS
list ieqn = 1 to neqn
smpl 1 nsteps

*FULL SET OF IRF's
impulse(model=mexicosvar,result=impblk,noprint,$
steps=nsteps,cv=%sigma)
***************************************************************
*RESPONSES OF ALL VARIABLES TO A SINGLE VARIABLE
do i=1,neqn
compute header="Plot of responses to "+implabel(i)
do j=1,neqn
set scaled(j) = (impblk(j,i))/sqrt(%sigma(j,j))
end do j
graph(header=header,key=below,klabels=implabel,number=0) neqn
cards scaled(ieqn)
end do i
***************************************************************
*RESPONSE OF A VARIABLE TO ALL SHOCKS
do i=1,neqn
compute header="Plot of responses of "+implabel(i)
graph(header=header,key=below,klabels=implabel,number=0) neqn
cards impblk(i,ieqn)
end do i

However after running the procedure above, it works pretty much till after the @VARIRF procedure when i try to do procedure highlighted in bold after which i obtain the following message:
## SX1. Identifier IMPLABEL is Already in use as a(n) RECTANGULAR[STRING]

and when I view series i see a matrix of IMPLULSES with contents AND one of IMPBLK with nothing inside.

I would like to ask if my procedure is right as regards obtaining the IRFs and where do my structural residuals estimated above, come in the generation of the Impulse responses.

A million Thanks in advance
WALLE
Posts: 11
Joined: Thu Jul 21, 2011 12:24 pm

Re: How to impose short and long run restrictions in SVAR

Unread post by WALLE »

I finally figured it out thanks tom :D
Post Reply