Gretl Manual: Gnu Regression, Econometrics and Time-series Library | ||
---|---|---|
Prev | Chapter 5. Sub-sampling a dataset | Next |
The discussion above has focused on the script command smpl. You can also use the items under the menu in the GUI program to select a sub-sample.
The menu items mostly work in the same way as the corresponding smpl variant, but with these differences:
When you use the item "Sample, Restrict based on criterion", and the dataset is already restricted, you are given the option of preserving or replacing the current restriction. Preserving the current restriction means, in effect, invoking the cumulate option described above (the Section called Restricting the sample).
When you use the items "Sample, Define based on dummy" or "Sample, Random sub-sample", and the dataset is already restricted, the current restriction (if any) is automatically preserved.
Note that behavior under point 2 above is not the same as for the script command smpl, where the preservation of any previous restrictions is not the default. The reason for this difference lies in the visual context of the GUI program: when the dataset is restricted, it is the restricted version which is "before" the user, indicated in the program's status bar. It therefore seems more intuitive to take this as a basis. If you want to replace the current restriction using one or other of these menu items, you should first invoke the item "Sample, Restore full range".