[Gretl-users] ADF P-value loop

Riccardo (Jack) Lucchetti r.lucchetti at univpm.it
Fri Sep 21 14:39:56 EDT 2012

On Fri, 21 Sep 2012, Logan Kelly wrote:

> Would something like this work?
> matrix X
> loop i=1..5 -q
>    loop m = i+1..5 -q
>            #Do stuff
>    endloop
> endloop

As far as I'm correct in imagining what your intentions are (having a 
nested loop in which the extremes of the inner loop depend on the counting 
variable of the outer loop), yes, as demonstrated by the following 

loop i=1..5 -q
     loop m = i+1..5 -q
         printf "%d, %d\n", i, m

But, out of curiosity, wouldn't have taken you much less to try this by 
yourself rather than asking the list? Note: it's good that you posted the 
question to the list, so it automatically enters the realm of Google's 
omniscience and others will find it in the future. I'm just asking.

  Riccardo (Jack) Lucchetti
  Dipartimento di Economia

  Università Politecnica delle Marche
  (formerly known as Università di Ancona)

  r.lucchetti at univpm.it

More information about the Gretl-users mailing list