On Mon, 14 Feb 2005, Renju Jacob wrote:
Ok, but even if I manage to do that, does GRETL allow the use of
nlr in a loop construct?
The nls command is now usable in loops, in gretl CVS -- there will
be a new Windows snapshot shortly. Also, there is an internal
variable, $nvars, accessible via the genr command, that holds the
number of variables in the current dataset (including the constant).
I don't fully understand the context you have in mind, but I suspect
that these changes may not be sufficient to do what you want. In
the context of an nls command, variables must be referenced by name,
not number (since numeric constants are also valid in that context).
So you have to know the names of the relevant variables to construct
a suitable gretl loop. I suppose that's OK if you know that the
dependent variable is called "y" and the independent variables are
always called "x1",...,"xn".
I'm inclined to repeat my previous advice: this seems to me a case
where an external scripting language might well be used to construct
a set of driver scripts for gretl. Gretl has very minimal string
handling, whereas scripting languages are at home with that sort of