On Mon, 14 Feb 2005, Renju Jacob wrote:
I am fairly new to the use of syntaxes on GRETL. My task is to
write a script that will dynamically count all variables in a
tabular file (e.g csv) and conduct a non linear regression for
each variable's dataset. I have figured out how to do it if there
is only one variable, but am trying to do it if there are more
than one variable laid out in a tabular format.
At present there's no programmatic way of counting the variables in
a datafile, within gretl itself. You can loop across a known list
of variables, but not an unknown list.
One possibility here is to complement gretl's capacities with a
scripting language (your favorite shell, perl or whatever). That
is, given a csv file, it would not be difficult to use, say, perl to
extract the list of variable names and write out a gretl script
that would loop over those variables, doing whatever it is you want
to do.
Allin Cottrell