Help using Base SAS procedures

Removing random sample obs from sampling frame after using Proc Survey

Reply
N/A
Posts: 0

Removing random sample obs from sampling frame after using Proc Survey

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
Super Contributor
Super Contributor
Posts: 365

Re: Removing random sample obs from sampling frame after using Proc Survey

Posted in reply to deleted_user
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
Ask a Question
Discussion stats
  • 1 reply
  • 107 views
  • 0 likes
  • 2 in conversation