BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I need to generate a random sample of 50 individuals from a sampling frame dataset. I did this using proc surveyselect....now, of those 50 random individuals, I need to remove them from the sampling frame now so if I drawn another random sample that don't have the chance to be included again....how would I go about removing the random generated sample from the sampling frame after they are chosen? Thanks
1 REPLY 1
SPR
Quartz | Level 8 SPR
Quartz | Level 8
Hello SASer,

You can use OUTALL option and for the second sampling use Selected=0. This is extraction from Proc SURVEYSELECT help:

OUTALL
includes all observations from the input data set in the output data set. By default, the output data set includes only those observations selected for the sample. When you specify the OUTALL option, the output data set includes all observations from DATA= and also contains a variable to indicate each observation's selection status. The variable Selected equals 1 for an observation selected for the sample, and equals 0 for an observation not selected. For information on the contents of the output data set, see the section "Output Data Set."

Sincerely,
SPR

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 904 views
  • 0 likes
  • 2 in conversation