On 12/13/2011 04:13 PM, Allin Cottrell wrote:
On Tue, 13 Dec 2011, Sven Schreiber wrote:
> Am 13.12.2011 02:29, schrieb Allin Cottrell:
>> 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 :-)
After updating to current cvs after the crash-bug fix, I have my
function working now, including the forecast. I don't remember changing
anything substantial that would make it easier for gretl to figure out
which are the lagged dependent variables though. (the small examples I
gave on the list shouldn't be overinterpreted here)
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.)
Ah yes of course, I should have remembered that.
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.
This would be useful I think, especially since the estimation method
could possibly be passed to the function as an argument (string, or
integer options).
thanks,
sven