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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1105 views
  • 0 likes
  • 2 in conversation