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!

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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