Combining Responses in The Same Graph

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
nazif

Combining Responses in The Same Graph

Unread post by nazif »

Dear,
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)
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Combining Responses in The Same Graph

Unread post by TomDoan »

The Ehrmann, Ellison, Valla replication includes a way to interleave regime-specific responses into a single graph:

http://www.estima.com/forum/viewtopic.php?f=8&t=1192
nazif

Re: Combining Responses in The Same Graph

Unread post by nazif »

Dear Doan,
Thanks. But I need to recover responses with their error bands using monte carlo simulations with mcdodraws procedure and then make them side-by-side graphs with the same scale on the vertical axis so that I can make proper comparisons. In the attached document I plotted responses to output using byshock option mcgraphirf. As I understand the vertical limit is determined by the maximum and minimum values of error bands. How can I assign specific values for the vertical min and max in this procedure?
Thanks
Nazif
Attachments
responses.docx
responses_to_output
(37.43 KiB) Downloaded 848 times
nazif

Re: Combining Responses in The Same Graph

Unread post by nazif »

Dear Doan,
Sorry about taking your time I will use MCProcessIRF procedure and then combine individual responses with spgraph.
Thanks
Nazif
Post Reply