El Jueves, 7 de Septiembre de 2006 11:33, Arnaud Bervas escribió:
...
Furthermore, is there a simple way, in a loop, to refer to a variable with
a shifted index (for example refer to X$i+1 rather than X$i), like in
Eviews (in which you only write !j =!i+1). I didn't manage to do something
similar with Gretl.
Thanks
Arnaud
Looking at Jack's script gmmstart.inp, published recently in this list (I
attach the file) may be the solution is to write a previous line "j = i+1"
and use the index j (but I have no very clear whether j is now an scalar or an
integer as "i")
loop i=2..11 --quiet
j = i - 1
matrix tmp[,$i] = (X[,j] - X[,11]) .* elmrs
end loop
I suspect that "j = i -1" is an alias of "scalar j = i - 1",
Do we have a command as "integer j = i - 1"?
--
Ignacio Díaz-Emparanza
Dpto. de Economía Aplicada III (Econometría y Estadística)
UPV-EHU