Am 24.01.2012 15:02, schrieb Allin Cottrell:
1) In gretl 1.9.7 the option of creating an "anonymous system"
(i.e. using the "system" command with neither assignment to a
name or a "method=whatever" tag) is confined to functions. But
it strikes me: why shouldn't this be available for scripting
in general? If you're not interested in creating a GUI session
icon, why should you have to name a system?
That's right, it's a bit artificial to limit that to functions.
But a more general thought on this: I assume that the reason for the
nice concept to first specify a system and then separately estimate it
with one or more estimators is that it would be annoying to repeat a
long-ish specification just for re-estimation.
(In contrast, re-estimating single equs doesn't seem to be possible via
their assigned names, presumably because their spec can be easily
repeated and thus there is no pressing need. Although it would sometimes
make for cleaner script code I guess.)
But this reason would apply also to systems in functions, and this would
mean that the real solution is to allow "private" names (local function
scope) for system specifications such that we can have the convenient
re-estimating feature (not only for the last model, as the anonymous
solution would imply).
In terms of syntax one could think of 'system --name=hello' or somesuch.
2) Also in 1.9.7, having defined an anonymous system you are
required to use the dummy name "$system" if you want to access
the system for the "restrict" or "estimate" commands, as in
estimate $system method=sur
This seems a bit clunky. Shouldn't such commands just work on
the last-defined system by default?
IMHO it doesn't look clunky at all, it can almost be read aloud.
(Imagine for a moment introducing 'with-method' as an alias for 'method'
and reading "estimate $system with-method=sur".) For example, why it may
be clear to the gretl pro that the last system is referenced, if you
also have a single-equ model in your script it is not immediately
obvious what is re-estimated.
But although explicit is better than implicit (from the Zen of Python
again), I admit that for simple rough-and-ready scripts the parsimony of
your suggestion could be nice.