Regarding Confidence Intervals
Posted: Sat Jan 13, 2018 12:11 pm
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
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