On Wed, 21 Mar 2012, Henrique Andrade wrote:
 I would like to share with you some thoughts about the automatic
creation
 of series in Gretl. The first point I would like to address is apparently
 inofensive.
 When we perform ADF and KPSS tests we see a different Gretl's behavior. To
 ilustrate this, please use the "australia.gdt" data.
 # First case: ADF test
 adf 4 E --difference --test-down
 No variable is created.
 # Second case: KPSS test
 kpss 4 E --difference
 The variable d_E is created. 
Agreed, that's inconsistent: if we're going to delete any 
automatically created lags with the adf command we should do 
the same for kpss. That is now fixed in CVS (or will be real 
soon).
 The second point is a little bit more "dangerous". Yet
using the
 "australia.gdt" data, please perform this script:
 <hansl>
 open australia.gdt
 "Teste 1" <- ols E const PAU PAU(-1) PAU(-2) E(-1) E(-2)
 print PAU* --byobs
 series PAU = 0
 print PAU* --byobs
 </hansl>
 One can observe that "PAU(-1)", and "PAU(-2)" are not equal to zero,
what,
 in my humble opinion, is not a desirable behavior. 
OK, this is a bit subtle, and should be clearly documented 
somewhere, but here goes...
1) When you issue a command such as
   ols E const PAU PAU(-1) PAU(-2) E(-1) E(-2)
[note: using the notation "varname(-lag)"] this results in the 
automatic creation of series whose names are "PAU_1", "PAU_2" 
and so on.
2) These named series are "hard-wired" in the sense that if 
you change the definition of PAU, PAU_1 and so on are not 
automatically redefined.
3) So if you say
  print PAU*
you're going to see your redefined PAU along with the original 
values of the series PAU_*.
4) However, if in any subsequent command you again use the 
notation "varname(-lag)" (not "varname_lag") you will get lags 
updated to match the redefined parent series. For example,
  print PAU PAU(-1) PAU(-2)
So: the notation "x(-p)" says to gretl "give me lag p of 
series x, as x is currently defined", whereas the notation 
"x_p" simply says "give me the series named x_p".
5) When you use the "x(-p)" notation, a side effect is that 
the series named x_p is updated (if need be).
Allin Cottrell