Am 12.08.19 um 21:25 schrieb Allin Cottrell:
On Mon, 12 Aug 2019, Artur Tarassow wrote:
> either I overlook something or currently the behavior of the
> "--contiguous" option of the "smpl" command has changed, as this
is
> not working using latest git on Ubuntu 19.04:
>
> <hansl>
> open denmark.gdt -q
> LRM[2] = NA # insert NA value
> list L = LRM LRY
> smpl L --contiguous # error
> smpl --contiguous L # error
> </hansl>
The error condition is consistent with the documentation for this
command:
"The effect is to trim any observations at the start and end of the
current sample range that contain missing values (either for the
variables in varlist, or for all data series if no varlist is given).
Then a check is performed to see if there are any missing values in
the remaining range; if so, an error is flagged."
Your NA at observation 2 is not skipped: it's not at the start of the
current sample range. Compare:
smpl 2 ;
smpl L --contiguous # advances the sample start to obs 3
Thank you for the detailed explanation, Allin. I totally overlooked this
"at the start" part of the documentation.
Best,
Artur