Thanks a lot, Allin. I am using gretl on a Windows machine. So, do I
wait till the Windows build is available? I believe that $nvars will
solve the issue of the variable count. Once I get the variable count, I
can use a loop construct to loop it through an NLS for each variable
vector. I'll be assigning suffixes to the independent variables. I can
do the variable counting and scripting using Perl/PHP, but it's only
that the script would just look gaudy and long :)
Also, is there a command to print out the variable name (e.g x1..x2
..). cos if u say outfile x1, it prints out the entire dataset for x1
Rgds
Renju
>> cottrell(a)wfu.edu 02/14/05 09:00PM >>>
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
thing.
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users(a)ricardo.ecn.wfu.edu
http://ricardo.ecn.wfu.edu/mailman/listinfo/gretl-users
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for
urgent or sensitive issues.