Gretl Manual: Gnu Regression, Econometrics and Time-series Library
Prev | Chapter 6. Sub-sampling a dataset | Next

# Random sampling

With very large datasets (or perhaps to study the properties of an estimator) you may wish to draw a random sample from the full dataset. This can be done using, for example,

    	smpl 100 --random

to select 100 cases. If you want the sample to be reproducible, you should set the seed for the random number generator first, using set.

This sort of sampling falls under the "restriction" category: a reduced copy of the dataset is made.

Prev | Home | Next
Restricting the sample | Up | The Sample menu items