[Gretl-devel] smpl <condition> --restrict --permanent

Allin Cottrell cottrell at wfu.edu
Wed Jul 1 19:46:50 EDT 2015


By popular request we introduced (in gretl 1.9.91) the --permanent 
option for the "smpl" command: this enables to the user to apply a 
sample restriction and permanently shrink the dataset to the new 
specification (as opposed to keeping the full dataset in the 
background).

It has recently come to light that this can cause problems under 
some conditions, in the context of a GUI session in particular, and 
I'm trying to decide how to handle this.

Consider a GUI gretl session of this sort: you open bigdata.gdt, 
estimate some models -- on the full dataset and/or on one or more 
subsamples -- and save these "as icons". Then you decide that 
bigdata is redundant for your purposes and you want to do a 
permanent subsampling. What happens with your saved models?

There's an easy case: all the models were in fact estimated on the 
particular subsample of bigdata that you'd like to impose 
permanently (something we can detect and handle quite easily).

Otherwise, some or all of the saved models are going to become 
zombies: in general there will be no way -- after the permanent 
subsampling -- to do things like running tests, saving residuals as 
series, plotting actual versus fitted and so on, since the 
dataset(s) on which these models were estimated will have 
disappeared.

So here's my proposal: in the circumstances described above, if
you issue a command to shrink the dataset permanently, gretl checks 
to see whether all saved models fall under the "easy case". If so, 
fine. If not, you get a warning that not all saved models can be 
preserved, with a "Go ahead? Yes/No" dialog. If you say "Yes", we
destroy all the models that would turn into zombies.

Any comments/suggestions?

Allin


More information about the Gretl-devel mailing list