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!
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.
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.
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →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.
Ready to level-up your skills? Choose your own adventure.