On Wed, 15 Jul 2020, atecon(a)posteo.de wrote:
Hi,
as nobody replied, yet: Can anybody confirm this behaviour?
The reference is to
https://www.mail-archive.com/gretl-users@gretlml.univpm.it/msg14808.html
Yes, I can confirm the behavior described there, but I don't think
it's a bug. Restricting the sample cannot change the fact that
Chrysler is firm 4 of 10 in the grunfeld dataset, and so the
string-valued "firmname" series must comprise at least 10 strings.
Otherwise it would be impossible to undo the restriction.
If you want to destroy that information and reconstitute the string
values on a smaller scale you can
1) Impose the sample restriction
2) Save the reduced dataset as CSV
3) Open the CSV and save as gdt
On a related matter, you can inspect the string values of a subset
of the grunfeld data in a fairly straightforward way:
<hansl>
open grunfeld.gdt
# e.g. restrict to even-numbered firms
smpl firm % 2 == 0 --restrict
strings S2 = strvals(firmname)[values(firmname)]
print S2
</hansl>
Allin