Am 06.12.2015 um 03:42 schrieb Allin Cottrell:
On Fri, 4 Dec 2015, Sven Schreiber wrote:
> as you will notice, I am currently working on a real-life panel dataset,
> and so here's another panel problem, with example; the following doesn't
> work for me ("no obs would be left"):
>
> <hansl>
> open abdata.gdt
> smpl IND == 3 --restrict # leaves 89 obs
> smpl unit == min(unit) --restrict # lowest unit value of the 89 obs is 6
> </hansl>
>
> My guess is that gretl evaluates min(unit) not as the lowest in-sample
> value (after applying the first restriction), but instead looks for the
> global minimum (which is 1). Then the two restrictions cannot hold
> simultaneously.
That's right. This is required if
smpl <whatever> --restrict --replace
is going to work.
Yes, but I did not have the --replace option in there !? The guide (in
section 5.3) says that "the second restriction augments the first".
Admittedly that does not pin down exactly the scope of the second
restriction, but I find this very surprising.
To put it differently, the expression "min(unit)" is currently evaluated
differently in identical circumstances (with respect to the active
sample and the contents of the series), if you compare my example with
your solution.
> But I think that all gretl functions that take a series argument always
> work on the currently defined sample, right? If so, then this looks like
> a bug.
I wouldn't say so.
?? Is this a "no" to the first sentence or just to the second?
thanks,
sven