BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
TT105
Calcite | Level 5

Hi, I have a general question about using the SRS method of random sampling by strata. I am wondering if using SRS by Strata will automatically result in the random sampling to be evenly distributed within each strata. By this, I mean that all records within each strata will have equal probability in getting selected. 

 

Example: I have 4 different groups identified by "ID" (1, 2, 3, 4). I have a file called SAMPSIZE to specify the number of samples I want to select from each group. If I use the proc surveyselect statement below, would the records within each strata ("ID") have an equal probability of being randomly selected? If not, how can this be done?

 

PROC SURVEYSELECT N=SAMPSIZE   METHOD=SRS   OUT=SAMPLES    DATA=POPULATION;
STRATA ID;
RUN;

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @TT105 and welcome to the SAS Support Communities!

 

All records in stratum 1 will have the same probability of selection, all records in stratum 2 will have the same probability of selection, etc., but the selection probabilities may differ between the strata. Suppose that stratum 1 contains 100 records, stratum 2 contains 200 records and the sample sizes specified in dataset SAMPSIZE for these two strata are 30 and 40, respectively. Then the selection probabilities will be 30/100=0.3 for the records in stratum 1 and 40/200=0.2 for those in stratum 2 and these probabilities will be contained in variable SelectionProb of your output dataset SAMPLES.

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hi @TT105 and welcome to the SAS Support Communities!

 

All records in stratum 1 will have the same probability of selection, all records in stratum 2 will have the same probability of selection, etc., but the selection probabilities may differ between the strata. Suppose that stratum 1 contains 100 records, stratum 2 contains 200 records and the sample sizes specified in dataset SAMPSIZE for these two strata are 30 and 40, respectively. Then the selection probabilities will be 30/100=0.3 for the records in stratum 1 and 40/200=0.2 for those in stratum 2 and these probabilities will be contained in variable SelectionProb of your output dataset SAMPLES.

TT105
Calcite | Level 5
Hi @FreelanceReinh, thank you for your response! This is what I had thought based on things I've read, but I needed to be extra extra sure. I appreciate the quick response!

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 661 views
  • 2 likes
  • 2 in conversation