On Thu, August 31, 2006 07:59, Arnaud Bervas wrote:
Hi,
I was wondering if it was possible, when constructing loops, to have 2 or
several indexes in order to differenciate between different sets of
variables. For instance, is it possible to run OLS estimation repetitively
taking each time a different dependent variable indexed by i, and a
different independent variable indexed by j in another list of variables ?
This would amount to having a loop on j within a loop concerning i.
Of course it is. Try this:
nulldata 20
genr y1 = normal()
genr y2 = normal()
genr x1 = normal()
genr x2 = normal()
loop for i=1..2
loop for j=1..2
ols y$i const x$j
end loop
end loop
Riccardo "Jack" Lucchetti
Dipartimento di Economia
FacoltĂ di Economia "G. FuĂ "
Ancona