BVAR IRFs

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

donihue
Posts: 137
Joined: Wed Oct 07, 2009 8:51 am

BVAR IRFs

Postby donihue » Sat Jan 08, 2011 12:00 pm

Hello Esther,

Best wishes for the new year! And thanks again for this excellent add-in.

In an earlier post, I asked you how the IRFs were calculated, because I found a discrepancy between that IRFs calculated using the add-in with a flat-flat prior and those from a standard VAR, despite coefficients being the same (as they should be).

In the bvar.prg file, you have put "matrix {%shock} = @cholesky({%A0})" and "call impulse({%responses}, {%Bv}, {%shock}, {%IRFPers}, !m, {%p})", so we should get the same results, if I understand the code. However, it seems that this is still not the case.

I attach two example files, one (BVAR08) being the results from the latest version of the add-in, and the other (BVAR08a) from the standard VAR, which show the persisting differences. You will see that although the responses of a variable to itself are identical, there are differences in the responses of variables to others.

Perhaps I have misunderstood how the calculations are performed, or is something strange going on here?

Best regards
Donihue
Attachments
BVAR08a.pdf
From the standard VAR command
(6.55 KiB) Downloaded 203 times
BVAR08.pdf
From the add-in with flat-flat prior
(24.9 KiB) Downloaded 216 times

EViews Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: BVAR IRFs

Postby EViews Esther » Mon Jan 10, 2011 10:31 am

donihue wrote: In the bvar.prg file, you have put "matrix {%shock} = @cholesky({%A0})" and "call impulse({%responses}, {%Bv}, {%shock}, {%IRFPers}, !m, {%p})", so we should get the same results, if I understand the code.

If you look at the subroutine file, impulse.prg, you will see the following command line which is commented out
'matrix tsmat = @transpose(smat)
(Why commented out? the Cholesky factorization finds the lower Cholesky factor.)
Due to this line, you will not get the same results by calling the function impulse(....).

I fix the problem by changing the code as:

call impulse({%responses}, {%Bv}, {%shock}, {%IRFPers}, !m, {%p})
for !ii=1 to !m
for !i=1 to {%irfpers}
matrix(!m,{%irfpers}) {%res}_{!ii}
matrix {%response} = @subextract({%responses}, !m*(!i-1)+!ii, !m*(!i-1)+1, !m*(!i-1)+!ii, !i*!m)
matplace({%res}_{!ii}, @transpose({%response}),1, !i)
next
next

Best,
Esther

donihue
Posts: 137
Joined: Wed Oct 07, 2009 8:51 am

Re: BVAR IRFs

Postby donihue » Tue Jan 11, 2011 5:03 am

Hi again, Esther.

Thanks for your reply and re-write suggestion.

I apologise for pestering, but I tried it out, and unless I have made a mistake (I changed only the one line in bvar.prg which you highlighted in red), it doesn't seem to solve the problem, as the attached file indicates: only the first column appears in the IRFs, for some reason.

Regards
Donihue
Attachments
BVAR10.pdf
Re-run of BVAR with updated code
(20.41 KiB) Downloaded 177 times

EViews Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: BVAR IRFs

Postby EViews Esther » Tue Jan 11, 2011 9:43 am

Dear Donihue,

Can you re-download BVAR.aipz and re-do your estimation?
If you still see the problem, please let me know.

Best,
Esther

donihue
Posts: 137
Joined: Wed Oct 07, 2009 8:51 am

Re: BVAR IRFs

Postby donihue » Tue Jan 11, 2011 11:17 am

Hello again, Esther,

I have re-downloaded the BVAR add-in and installed it.

When I attempt to construct the BVAR model cited in earlier posts, I receive the message "_YLAG01 is not defined", and the programme crashes, spewing out extraneous variables into the workfile. (I recall we had a similar problem once some months earlier ...). Could the re-write have gummed something up?

Regards
Donihue

EViews Esther
EViews Developer
Posts: 149
Joined: Fri Sep 03, 2010 7:57 am

Re: BVAR IRFs

Postby EViews Esther » Tue Jan 11, 2011 4:18 pm

I am updating on impulse response calculation by using simulation.

I will upload the new one soon with the solution of your problem.


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 17 guests