On Tue, 13 Dec 2011, Sven Schreiber wrote:
Am 13.12.2011 02:29, schrieb Allin Cottrell:
> On Mon, 12 Dec 2011, Sven Schreiber wrote:
>
>> Well I'll keep trying to trigger it [a bad error message
>> on accessing a forecast-matrix row]
>>
>> But in general, if gretl cannot figure out the lagged dependent
>> variables...
>
> If you'll pardon me, gretl would have needed a crystal ball to
> figure out that a lagged dependent variable was intended in the
> script you posted: you passed the series in question by value.
Of course, and it wasn't meant as a criticism, just as "in those cases
where it is impossible for gretl to..."
OK, sorry if I seemed defensive.
> In the case you posted, a one-step ahead forecast was
> possible but a forecast over the full range specified was
> not. I'm not sure whether it's preferable to flag an error,
> or just do what's possible [...]
I'm sure there's a case for both ways. I would like to see at least a
warning though. And IMHO partial failure still is failure (again, not
gretl's fault, just a fact).
The thing is that with the "fcast" command in general, it may
well be that there are missing values to work around, so that
the output may also contain missing values -- which is not, in
general, considered an error in gretl. But I take your point
that a warning could be helpful.
> Anyway, here's an attempt to reproduce something like what
you
> described (incremental forecasting); it works OK with CVS
> [...]
Yes thanks, no need to do my work for me :-)
OK, but to revert to another issue you raised, I find that in
the body of a script the following trope works fine:
mysys <- system
equations Y X
end system
estimate mysys method=SUR
It doesn't work in a function, but that reflects the general
fact that the "name <- command" mechanism is not enabled in
functions. (Basically this is a GUI thing, meaning "create an
icon based on the command to the right of the "<-". And
functions can create icons only by returning bundles.)
But I'm thinking that while "<-" is not really appropriate in
functions we could support
system
equations Y X
end system
with the meaning: create an "anonymous" system which will then
be the target of the "estimate" (and "restrict") commands. The
system would stay in place as "the last defined system" until
either the function returns or another "system" command is
issued.
Allin