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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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