
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