On Thu, 10 Mar 2011, Austin Spry wrote:
I have a custom data set in panel format using 'Trees' as
Group/Unit index and 'Age' as the Time index. All 'Trees' also
belong to one of 27 'Stands'.
When I restrict the sample to a particular 'Stand', the data set
structure does not transfer to the sample set. The 'Trees' and
'Age' indices must be reassigned every time I restrict the
sample group. (The complete data set retains its specification
as 'Panel Data' when I 'Restore Full Range'.)
Am I doing something brainless here? Is there some reason GRETL
keeps the entire data set as 'Panel' while changing each sample
to 'Cross-Sectional'?
Hello Austin,
I don't suppose you are doing aything brainless, but I don't know
exactly what your dataset looks like, and on the face of it what
you are reporting is puzzling.
When you restrict the sample, starting from a panel dataset, gretl
checks to see if the restricted sample can still be interpreted as
a panel, and it drops back to a cross-sectional interpretation
only if the panel interpretation seems to be unavailable.
Obviously, a panel interpretation makes sense only if the
restricted sample still contains at least two groups and at least
two time periods.
By way of illustration, consider this gretl script (greene14_1 is
a panel dataset comprising 6 "units" or "groups" observed over 15
time periods):
open greene14_1.gdt
series foo = (unit==1 || unit==3)? 1 : 2
The "foo" series is intended to emulate your "Stand" variable. If
you now restrict the sample using "foo = 1" as criterion, you get
a panel with two groups, corresponding to the original "units" 1
and 3. If you restore the full sample then subsample using "foo =
2" as the criterion, you again get a panel, comprising the
original "units" 2, 4, 5 and 6.
If you're using a very old version of gretl this might not work as
described. The current version is 1.9.4.
Allin Cottrell