Page 1 of 1

Cumulative Impulse Responses

Posted: Wed Feb 24, 2016 5:39 am
by atanu
Hi Tom, and RATS users,

Have a simple query: I would like to know if I could plot the graph of a cumulated impulse response function with standard errors. I have used the following code to get the impulse responses with confidence intervals (I want to isolate the effect of a response of X4 to a shock in X1:

Code: Select all

system(model=varmodel)
variables x1 x2 x3 x4
lags 1 to 2
det constant
end(system)
estimate(resids=resids,pri,ftests)
*
impulses(model=varmodel,result=impulses,steps=12,print,FACTOR=%identity(%nvar))
dec rect[ser] accumimp(%nvar,%nvar)
do i=1,%nvar
  do j=1,%nvar
     accumulate impulses(i,j) 1 12 accumimp(i,j)
  end do i
end do j

print / accumimp(4,1)

source mcvardodraws.src
@mcvardodraws(model=varmodel,draws=2000,step=12)
@mcgraphirf(model=varmodel,center=mean,percent=||.16,.84||, $
  include=||4||)
Now when I want to graph the cumulated response functions:

varirf(model=varmodel,steps=12,page=byshock,factor=%identity(%nvar), $
accum=||4,1||)

does the responses but for all shocks. I just want the graph of a response of x4 to a shock in x1. Also can I have the error bands on the graph as well?


I also tried:
graph(series1=accumimp,key=below)

but the scales did not make sense and again I could not isolate accumimp(4,1), which is what I want as agraph with confidence intervals.

Any help would be appreciated.
Many thanks.

Re: Cumulative Impulse Responses

Posted: Wed Feb 24, 2016 7:28 am
by TomDoan
@MCGRAPHIRF has an ACCUMULATE option.