[also moving to devel]
Am 29.06.2010 21:29, schrieb Allin Cottrell:
On Tue, 29 Jun 2010, Sven Schreiber wrote:
> Actually as a goal (2.0-ish?) I think it would be nice if sample
> restrictions worked better with panel data. For example, something like:
> smpl 1960 1980 --idtime=year
> would ideally leave the cross-sectional dimension alone and restrict the
> time dimension as was intended above.
> Or alternatively/equivalently:
> setobs unitcount year --panel-vars
> smpl 1960 1980 --time-dim
This idea looks quite attractive at first, but I'm afraid it gets
confusing fast. The trouble is that we have two modes of setting
the sample, which behave somewhat differently and have different
support behind the scenes: (a) just shifting the end-points; and
(b) carving a chunk out of the full dataset on some criterion, and
making the chunk the current dataset for the time being.
From the user's point of view in the context of panel data in mode
there's two different kinds of end points: cross-sectional and
time-dimensional. That relatively trivial statement is really the heart
of my argument.
I totally understand the issues on the development side and I also
completely accept it if those turn out to be prohobitive. But the
crucial thing is to acknowledge the natural point of view of panel data
In a panel dataset in the form of stacked time-series (which is
the representation gretl uses) you can sample in mode (a) by
choosing a contiguous subset of individuals or units, but sampling
by time period necessarily involves mode (b): we have to carve the
dataset up; it's a --restrict operation. The syntax you're
suggesting in effect "dresses up" a --restrict as if it were a
simple moving of end points. But we can't make this sort of
sampling behave in that way and I suspect it will end in tears.
As you say, the internal representation of the data is the key driver
here. But the user doesn't care about that, that's my point. From what I
understand, the current situation in gretl is that the two data
dimensions in panel data are not both treated as "first-class citizens".
The question is what amount of effort should gretl make to change this
situation. The answer may well be: zero; I believe you that it could end