Regarding Confidence Intervals

Questions and discussions on Vector Autoregressions
RK2509
Posts: 30
Joined: Wed Apr 15, 2015 3:16 pm

Regarding Confidence Intervals

Unread post by RK2509 »

Hi Tom,

I had a question regarding confidence intervals. I am trying to look at Uhlig's sign restrictions code and I am trying to use a few steps from there for my code. My work is based on identifying shocks using recursive ordering, but inorder to draw confidence intervals, I was trying to write the code somewhat differently which ran but I didnt understand what exactly the code did.

I am doing a VAR with subset factors (factors extracted from a bunch of macro variables), and I ordered them recursively (economic activity, price level, interest rates, money supply, and exchange rate). I am identifying shocks using the recursive ordering and Cholesky decomposition. Attached is my code.

At the end, when I am trying to draw confidence intervals, after doing the montecarlo, instead of using @MCGRAPHIRF, I do the following (written below), but I am not too sure what exactly this is doing. The results to me seem to be like responses of the factors to an exchange rate shock (which is ordered last), but I don't know how is it generating that.

Does this method look right? What I am struggling is to understand these IRF's are responses to which shock?

clear upper lower resp
*
spgraph(vfields=3,hfields=2,$
hlabel="")
do i=1,nvar
compute minlower=maxupper=0.0
do j=1,nsteps
set work = %%responses(t)(i,j)
compute frac=%fractiles(work,||.16,.84||)
compute lower(j)=frac(1)
compute upper(j)=frac(2)
compute resp(j)=%avg(work)
end do j
*
smpl 1 nsteps
graph(ticks,number=0,picture="##.##",header="Impulse Response for "+vl(i)) 3
# resp
# upper / 2
# lower / 2
end do i
spgraph(done)

I will be extremely grateful for your help. My RATS skills are not that great but I am learning by doing.
Thank you so much
Attachments
RK2509-practice.RPF
(15.57 KiB) Downloaded 782 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Regarding Confidence Intervals

Unread post by TomDoan »

I'm not sure what Uhlig's procedure has to do with what you're trying to do. Sign restrictions is a completely different approach, which requires completely different calculations than using a recursive (Cholesky) ordering. It sounds like you should just be able to use @MONTEVAR which takes care of pretty much everything.

However, what the graphing loop there is doing is extracting the set of draws for a particular response and step and computing the .16 and .84 percentiles (into lower(j) and upper(j)) and the mean (into resp(j)) and then graphs them. The problem with that is that it's designed for the original Uhlig paper which only identified a single shock.

The main problem you have is that you're not taking advantage of the many procedures that have been written to do different parts of this analysis. For instance, @PRINCOMP can do the principal components calculations. @MONTEVAR, @MCVARDODRAWS, @MCGRAPHIRF are designed to do the Monte Carlo integration and graphing for IRF's in VAR's.
Post Reply