On Wed, 19 Jan 2022, Sven Schreiber wrote:
Am 18.01.2022 um 17:58 schrieb Allin Cottrell:
> Here's my simple case. Can you see what extra stuff you need to
> introduce to provoke the problem?
OK, thanks, this is helpful. I managed to provoke the same error message
that I had before (no obs would be left):
<hansl>
function void pansmpl (series y, int val1, int val2)
series u = $unit
smpl u == val1 --restrict
print u
# workaround:
# smpl --full
smpl u == val2 --restrict --replace
print u
end function
nulldata 40
setobs 4 1:1 --stacked-time
series y = normal()
setobs 4 2000:1 --panel-time
series mydates = $obsdate
smpl mydates < 20001001 --restrict # discard last quarter
pansmpl(y, 3, 7)
</hansl>
OK, now we're in business. That's fixed in git.
One comment: using "mydates" and smpl --restrict is a kinda
roundabout way of sampling panel data in the time dimension. You
could do
smpl 2000:1 2000:3 --time
or (with or without setting panel-time) just
smpl 1 3 --time
But the bug and its fix are invariant with respect to these choices.
Allin