In
http://lists.wfu.edu/pipermail/gretl-users/2018-August/013277.html
Artur gave a piece of hansl script that he reckoned ought to work
but which in fact failed, namely creation of a list of first lags
by direct reference to a list of series contained in a bundle:
<hansl>
open denmark.gdt -q
list L = LRM LRY
bundle b = null
b.L = L
b.L1 = b.L(-1) # fails here
</hansl>
In my initial reply I gave a rationalization for why this wouldn't
work, but I now think I was mistaken, or at least almost mistaken!
Another formulation in the close neighborhood works OK, namely
that using the lags() function:
b.L1 = lags(1, b.L)
so why shouldn't the shorthand employed by Artur work too? Well,
there's one long-standing blockage: to use notation such as "(-1)"
to indicate taking a lag, either the term to the left must be a
named series, or -- if it's a list rather than a series -- you must
flag your intention to create a list by using the "list" keyword.
So, even ignoring bundles, (a) below works but (b) doesn't
open denmark.gdt -q
list L = LRM LRY
list L1 = L(-1) # (a), OK
L2 = L(-1) # (b), fails
If you're with me so far, here's the next step. It then seems that
the following should work in Artur's context:
# ought to work, right?
list b.L1 = b.L(-1) # with "list" out front
but that also failed. And that, I'd say, was a bug (or at least a
missing feature). So it's now fixed in git.
A list inside a bundle should be usable in the same sort of way as a
list "on the loose", provided it validates as a list in the context
of the current dataset (that is, none of the series ID numbers it
contains are out of bounds).
Allin