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
BVAR IRFs
Moderators: EViews Gareth, EViews Moderator, EViews Esther
BVAR IRFs
- Attachments
-
- BVAR08a.pdf
- From the standard VAR command
- (6.55 KiB) Downloaded 435 times
-
- BVAR08.pdf
- From the add-in with flat-flat prior
- (24.9 KiB) Downloaded 461 times
-
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: BVAR IRFs
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
Re: BVAR IRFs
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
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 415 times
-
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: BVAR IRFs
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
Can you re-download BVAR.aipz and re-do your estimation?
If you still see the problem, please let me know.
Best,
Esther
Re: BVAR IRFs
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
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 Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: BVAR IRFs
I am updating on impulse response calculation by using simulation.
I will upload the new one soon with the solution of your problem.
I will upload the new one soon with the solution of your problem.
Who is online
Users browsing this forum: No registered users and 33 guests