Moving this here from the devel list:
The irf() function is a weird thing in the sense that it is the only (?) function that requires input beyond its specified arguments. Namely the information from the previous VAR/VECM estimation. From a programming-language systematic point of view it seems to be the "odd man out".
In contrast, the analogous FEVD calculations are not wrapped in a function, but in the $fevd accessor, which makes more sense IMO.
So I suggest to introduce a matching $irf accessor with the same layout as the $fevd accessor. I am aware that the irf() function also needs an alpha input; this could be done via "set irf_alpha 0.1" or something like that.
Alternatively, the irf() function could get a new bundle argument which would collect the VAR/VECM results. That way, no dependency on non-argument input would be required, making the use consistent with all other functions.
Thanks,
Sven
[changing the ticket title a little to reflect the new focus]
Some discussion on the list ended with the following plan:
1) Add a fevd() function that provides an interface analogous to the irf() function.
2) Later, add a new optional bundle argument to these functions which contains the information from a VAR/VECM estimation, such that the new $system accessor can be used in there. (If that argument is omitted, the current behavior is retained, using the last estimated VAR.)
thanks,
sven
Some details of the implementation are still being discussed, but in principle the fevd() function is now there, and irf() takes a $system bundle arg. So closing this.