Learn how to sample subsets of observations within a Stata dataset.
The following code will come in handy for this tutorial.
webuse nlswork
describe, short
sample 15
describe, short
webuse nlswork, clear
sample 10 if race==2
tab race
webuse nlswork, clear
sample 10 if race==2|race==3
tab race
webuse nlswork, clear
sample 10, by(race)
tab race
Ещё видео!