On Wed, 7 Sep 2011, Sven Schreiber wrote:
here's some suggestions for how to improve (IMHO) system
estimation in
gretl (or hansl for that matter):
1) The basic system spec syntax is a bit awkward:
'system ... end system'
should be like a parenthesis, as in 'if ... endif', 'loop ... endloop'
etc. Hence the keyword 'system' should be at the beginning of the line.
So instead of:
mysysname <- system
...
end system
it would be better to have:
system -> mysysname
...
end system
or something like that. (Of course such a syntax reform would be
something for gretl 2.0.)
Sorry, Sven, but I don't really get that. We don't have much of the
"pointy arrow" business in gretl (and maybe we should have none of
it) but its role in gretl syntax is to handle a command (or command
block) that is acting something like a function, in that it offers
some sort of assignment. In all the computer science contexts that
I've come across (and notably in R, with which at least some gretl
users may be familiar), the idiom is
assignee <- <thing offering assignment>
I'm not sure if you're proposing that all such arrows be reversed,
or just the one for "system", but we need consistency, and I don't
see how reversing all the arrows (mle, gmm, plain single-equation
models, graphs) would improve/clarify matters.
Maybe I'm missing your point. If so, please elaborate.
2) It would be nice if the system spec could be built programatically
in
a script,
e.g. something like:
<hansl>
mysysname <- system
loop foreach i myendoglist
equation $i myregressorlist
endloop
end system
</hansl>
You could do that by defining strings outside of the system block
then cashing them with "@" inside (I think, not tested). But that's
kinda clunky, I'll admit. Might be worth exploring.
3) And finally a general (and old) topic: I thought variable
identifiers could now be longer than 15 chars in a script, but I
get an error with list names that become longer than that. As I
keep repeating every once a while (now's a good opportunity) I
still find that restrictive, makes scripts harder to read because
we have to use less descriptive, self-explanatory names.
Function names can be longer, but variable identifiers are still 15
characters max.
I guess there's a cultural difference here. The approach I recommend
is short identifiers plus comments to clarify them if need be.
Personally, I'd never by choice use identifiers of even close to 15
characters for variables, and I abhor the style of using, e.g.
"IntLoopCountIndex" rather than "i" -- but that's just me.
For sure, memory is cheap these days, and I'm not dead set against
an extension to, say, 31 characters max, though I'd never use that
myself. The problem is how to handle the numerous printouts that
gretl does (model results, side-by-side printing of series, summary
statistics, correlation matrices, etc., etc.). Whenever I think
about this, the printing of results when allowing for very long
identifiers seems to me an intractable problem.
Allin