Hi,
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.
cheers,
sven