On Tue, 1 Oct 2013, Artur T. wrote:
Hi all,
I've got an issue with the following. It used to work in the past, but
doesn't do so anymore. I want to estimate a panel model for a sub-sample
dataset. I am using current cvs on linux.
<hansl>
open abdata.gdt
# Restriction for which panel structure remains
smpl YEAR > 1977 --restrict
smpl full
# Restriction for which panel structure doesn't remain
# -> Undated dataset
smpl YEAR > 1977 && EMP > 40 --restrict
# Redefinition to panel structure is not allowed acc. to gretl
setobs unit YEAR --panel-vars
<\hans>
Yes, this is a problem for me too. It breaks a (long) script I'd written
some time ago. The reason is laid out in
http://lists.wfu.edu/pipermail/gretl-users/2013-September/009211.html
Unfortunately, Allin is right in that re-imposing the panel structure on a
sub-sampled dataset can cause disruption to no end. There are ways to go
around this limitation, but it atm takes some ingenuity. For example, this
<hansl>
nulldata 96
setobs 6 1.1 --stacked-time-series
id = $unit
tt = time
x = normal()
y = normal()
smpl x>0 --restrict
setobs id tt --panel-vars
dy = diff(y)
</hansl>
which used to work, has to change into something like
<hansl>
nulldata 96
setobs 6 1.1 --stacked-time-series
x = normal()
y = normal()
dy = (x>0 && x(-1)>0) ? diff(y) : NA
</hansl>
I know it's annoying, but it's necessary. If I find a smarter way to do
this, I'll tell you.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------