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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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