I have written the following code to compare the responses to variables in the same VAR model focusing on different samples. Could you please show me how to combine responses in the same graph with the same vertical scale?
Thanks.
Code: Select all
open data oil_output_rats_level_en_eco.xls
calendar(m) 1987
data(format=xls,org=columns) 1987:1 2011:3
*************************************************************************************************
compute [vect[strings]] implabel=|| "dlind","dlcoil", "dlner", "dlgasr", "dlcpi"||
compute nsteps = 18
compute p = 3
*
**************************************************************************************************
set low = DLCPI{1}< 0.01746
set high = DLCPI{1}>=0.01746
**************************************************************************************************
graph(shading=high) 1
# DLCPI
*******Linear VAR******************************************************************************
system(model=poilmodel2)
variables DLINDTR DLROIL DLNER DLgaSCPI DLcPI
lags 1 to p
det constant
end(system)
estimate(resids=varresids)
*
errors(model=poilmodel2,window="Variance Decomposition(linear)", steps=nsteps)
impulse(model=poilmodel2, window="Impulse Responses", steps=nsteps, result=impulses)
@MCVARDoDraws(model=poilmodel2, steps=nsteps)
@MCGraphIRF(model=poilmodel2,VARLABELS=implabel,SHOCKLABELS=implabel,$
center=mean,page=byshock,HEADER='Linear VAR',STDDEV=1.0 )
*********High Inflation Regime********************************************************
system(model=poilmodel1)
variables DLINDTR DLROIL DLNER DLgaSCPI DLcPI
lags 1 to p
det constant
end(system)
estimate(resids=varresids, smpl=high)
*
errors(model=poilmodel1,window="Variance Decomposition(High)", steps=nsteps)
impulse(model=poilmodel1, window="Impulse Responses", steps=nsteps, result=impulseshigh)
@MCVARDoDraws(model=poilmodel1, steps=nsteps)
@MCGraphIRF(model=poilmodel1,VARLABELS=implabel,SHOCKLABELS=implabel,$
center=mean,page=byshock,HEADER='High Inflation',STDDEV=1.0)
******Low inflation Regime************************************************
system(model=poilmodel3)
variables DLINDTR DLROIL DLNER DLgaSCPI DLcPI
lags 1 to 4
det constant
end(system)
estimate(resids=varresids, smpl=low, noprint)
*
errors(model=poilmodel3,window="Variance Decomposition(Low)", steps=nsteps)
impulse(model=poilmodel3,window="Impulse Responses", steps=nsteps, result=impulseslow)
@MCVARDoDraws(model=poilmodel3, steps=nsteps)
@MCGraphIRF(model=poilmodel3,VARLABELS=implabel,SHOCKLABELS=implabel,$
center=mean,page=byshock,HEADER='Low Inflation',STDDEV=1.0)