Hi, I have a database with 5000 obs of which I only need 600. I have used the following syntax:
set seed 10101
sample 600 if valid == 1, count (valid is a conditional variable for the selection)
However, running 'sample' removes all other observations. I want to create a variable that puts 1 to the selected observations and 0 to the unselected ones, instead of deleting them.
Any advice for it?
Thank you,
Adolfo Aramburu
set seed 10101
sample 600 if valid == 1, count (valid is a conditional variable for the selection)
However, running 'sample' removes all other observations. I want to create a variable that puts 1 to the selected observations and 0 to the unselected ones, instead of deleting them.
Any advice for it?
Thank you,
Adolfo Aramburu
Comment