Replicate IRF in Diebold Rudebusch Aruoba (2006)

Discussion of State Space and Dynamic Stochastic General Equilibrium Models
swnzh86
Posts: 10
Joined: Fri Jun 15, 2018 9:14 am

Re: Replicate IRF in Diebold Rudebusch Aruoba (2006)

Unread post by swnzh86 »

Here is the plot code.

spgraph(vfields=6,hfields=6)
do j = 1,6
do i = 1,6
graph(min=-1.25,max=1.25,NODATES,VTICKS=4, NUMBER=0) 3
# IRFGRAPH(i,j)
# upper_matrix(i,j)
# lower_matrix(i,j)
end do i
end do j
spgraph(done)


However, the problem is not the plot, since the calculation of the upper_matrix and lower_matrix that store that confidence bands is corrupted.
Only upper_matrix(6,6) and lower_matrix(6,6) are estimated correctly while others only contain zero.
Here is the replication code plus dlmirf and modified varirfdelta in a zip file.

Thanks!
Attachments
DRA_Model.zip
(24.82 KiB) Downloaded 737 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Replicate IRF in Diebold Rudebusch Aruoba (2006)

Unread post by TomDoan »

You need to add local i j to the VARIRFDELTA procedure. (That was missing in the original procedure, and causes problems when embedded within your own i,j loop).

Note, however, that I don't think that what they did (and what you are doing) is actually correct. The estimated factors aren't "data"; they're estimates, and they're estimates that depend upon the value of lambda. It looks like they are taking lambda at the maximum likelihood value, taking the maximum likelihood estimates of the factors based upon that, and then doing fairly standard VAR analysis acting like those are known. That does not give you the uncertainty from the model as a whole.
swnzh86
Posts: 10
Joined: Fri Jun 15, 2018 9:14 am

Re: Replicate IRF in Diebold Rudebusch Aruoba (2006)

Unread post by swnzh86 »

Dear Tom,

thanks for the help!

Best

Siwen
Post Reply