Am 03.10.2022 um 03:20 schrieb Federico Fiorani:
Dear all,
in my opinion a brief description in the manual of how series, bundles and restrictions work might be helpful.
As example:

nulldata 10
s = index % 2 ? NA : 1
bundle b = null
smpl 1 5
b.s1 = s
smpl full
smpl --no-missing
b.s2 = s
smpl full
print b

bundle b:
  s1 (series: length 10)
  s2 (series: length 5)

I suppose that the series "s1" has 10 element for "preserving information", because in "smpl 1 5" you could use only a part of "s", but you cannot do that with "--no-missing" because the series after sampling is completely different.
Anyway, it isn't obvious at first sight why series s1 and s2 have different length.

What do you think?

Having series in bundles is a relatively recent possibility, and indeed there are known complications when you do that. (I mean generally speaking; I haven't thought through your example.) I think Allin was always a bit hesitant to allow or promote that thing precisely because of those complications, but in the end there was a demand for it.

The general problem is that a series is conceptually tied to an active dataset "in place" (as the jargon goes), but a bundle can get totally detached from the loaded dataset context.

This most likely doesn't answer your question, it's just some background remarks from my side.