[Gretl-users] Loops...
Riccardo (Jack) Lucchetti
r.lucchetti at univpm.it
Sun May 18 09:46:03 EDT 2008
On Sun, 18 May 2008, Mariusz Doszyń wrote:
> Hello...
> I've got 32 variables for 16 objects (2 for each of them) and want to use
> such a pairs of variables [1;17], [2;18], [3;19], ..., [16;32] to make
> some tests and computations. I've written a script but still wondering if
> there better possibility to do this.
You may find the script below useful. It's a bit of a hack, but it works:
<script>
open AWM
list X = GDN*
loop foreach i X
j = varnum($i)+10
sprintf cmdstr "$i const %s", varname(j)
ols @cmdstr
end loop
</script>
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti at univpm.it
http://www.econ.univpm.it/lucchetti
More information about the Gretl-users
mailing list