On Wed, 23 May 2018, Sven Schreiber wrote:
Am 22.05.2018 um 18:51 schrieb Allin Cottrell:
>
> We now have irf() and fevd() functions which go part-way to meeting Sven's
> suggestions. We could go all the way if we reckon it's worthwhile (see
> below). Anyway, at present:
That's a very welcome addition, thanks! (Although I had to remind myself it's
all about the built-in Choleski identification.)
Is the horizon for these functions determined by the "set" command or is it
taken from the $system bundle?
As things stand the horizon is taken from "set". We could insert an
argument to determine it.
> The final, optional, bundle argument should be obtained via the
$system
> accessor
I think that it's very good that the functions can be used "standalone"
now,
without requiring an implicit context.
Agreed.
> It seems to me that when a FEVD is wanted, most of the time
you'd want it
> for a single "target" variable and all sources of variation.
Not sure that's correct. Sometimes a new type of shock is proposed and then
the question is "how much of output does it explain? and of consumption?" and
so forth.
OK, I take that point. So I think we do want a "source" or "shock"
argument to fevd().
BTW, I'm not necessarily pushing that feature, but in principle
fevd() could
also get a bootstrap variant like irf() has. It's certainly less common to
see assessments of fevd fraction uncertainty compared to irf bands, but it
would just be a mirror image.
OK, "for future reference" ;-)
(Am I right in assuming that a new alpha argument could be added in
the
future without compromising backwards compatibility? What I mean is that a
call like fevd(<int>, <bundle>) would still be possible if the in the future
the signature would be: <int>, <optional-scalar>, <bundle>, right?)
Hmm, not really. You'd need an argument-separating comma, as in
fevd(<int>,,<bundle>)
It's true that since the (notional) second and third arguments here
are of different types, we could in principle check the types and
"see" that the argument given second must really be the third one,
but that sort of thing (auto-detection of implicitly omitted
optional arguments) is not supported in geneval.c for any functions
at present. Its also strikes me as kinda tricksy.
> In the (more expensive) IRF case, however, it seems to me that
the response
> of a single target to a single shock (with or without a confidence
> interval) would be the most "natural" unit. So you have to specify both
> target and shock.
Yes, that's the way it is done now. But I've asked myself in the past what
happens in the bootstrap case; if you call irf() in a loop to get all
responses and you want the bootstrap, it seems a bootstrap has to be done N
times instead of just once. (Or even N^2 times.)
>
> Possible modifications: We could add a "source" argument to fevd() to
> narrow the output, and for the target/shock arguments to both functions we
> could let 0 signify "do everything".
>
The argument in favor of source in fevd is mainly the analogy to irf I'd say.
The "do everything" variant can always come later without breaking anything;
however, it would seem to be much more efficient in the bootstrap case.
I take the IRF efficiency point. And Yes, supporting "0 means all"
is something that could easily be added later without breaking
backward compatibility.
Allin