Page 1 of 1

impulse graphs

Posted: Mon Feb 15, 2010 2:00 pm
by asdavies6032
I am a RATS novice and I would like to know what to do: I have a 7 variable VAR and i used montevar.prg.How do I modify the program to display impulse graphs for only one variable, or is that not possible?

Re: impulse graphs

Posted: Mon Feb 15, 2010 2:36 pm
by TomDoan
The two procedures MCVARDoDraws and MCGraphIRF split the tasks done by MONTEVAR into two parts:
  • MCVARDoDraws does the Monte Carlo draws
  • MCGraphIRF organizes the graphs
MCGraphIRF has INCLUDE, PAGE and COLUMNS options to better control the graphs that are produced. This is part of the Y-M example from the Sims and Zha(1999) example file:

http://www.estima.com/procs_perl/700/simszhaecm1999.zip

Code: Select all

*
* Replication file for Sims and Zha(1999), "Error Bands for Impulse Responses",
* Econometrica, vol 67, no. 5, pp 1113-1156.
*
* Y-M model
*
open data simszha.xls
calendar(q) 1948
data(format=xls,org=columns) 1948:01 1989:03 gnp82 m1
*
compute nlags=4
compute nsteps=32
compute bootdraws=1000
compute mcdraws=1000
*
set gnp82 = 100.0*log(gnp82)
set m1    = 100.0*log(m1)
*
system(model=varmodel)
variables gnp82 m1
lags 1 to nlags
det constant
end(system)
*
estimate(noprint,resids=resids)
impulse(model=varmodel,steps=nsteps,results=baseirfs,noprint)
*
* Do figure 2
*
@mcvardodraws(model=varmodel,draws=mcdraws,steps=nsteps)
@mcgraphirf(model=varmodel,$
   center=input,impulses=baseirfs,percent=||.025,.16,.84,.975||,$
   footer="Figure 2. Pointwise 68 and 95% Posterior Bands, Y-M Model")
To do just the responses of GNP, you could add the option INCLUDE=||1|| to the @MCGRAPHIRF. INCLUDE=||2|| would just do the responses of M1.

Re: impulse graphs

Posted: Wed Feb 17, 2010 8:58 pm
by asdavies6032
Thanks. the programs worked all right. but i'm not sure i'm getting the right response.what i want is this:
i have a 7 variable VAR - y p pcom ff nbr totr m1. i want to only show response of all 7 variables to a
shock to one variable say ff

Re: impulse graphs

Posted: Thu Feb 18, 2010 9:29 am
by TomDoan
asdavies6032 wrote:Thanks. the programs worked all right. but i'm not sure i'm getting the right response.what i want is this:
i have a 7 variable VAR - y p pcom ff nbr totr m1. i want to only show response of all 7 variables to a
shock to one variable say ff
It sounds like you want PAGE=BYSHOCK, probably with COLUMNS=2 with 7 variables. That will produce a graph for each shock; just ignore the ones you don't need.