The SURVEYSELECT Procedure

Simple Random Sampling

The method of simple random sampling (METHOD=SRS ) selects units with equal probability and without replacement. Each possible sample of n different units out of N has the same probability of being selected. The selection probability for each individual unit is $n/N$. When you request stratified sampling by using a STRATA statement, PROC SURVEYSELECT selects samples independently within strata. The selection probability for a unit in stratum h is $n_ h/N_ h$ for stratified simple random sampling.

By default, PROC SURVEYSELECT uses Floyd’s ordered hash table algorithm for simple random sampling. This algorithm is fast, efficient, and appropriate for large data sets. For more information, see Bentley and Floyd (1987) and Bentley and Knuth (1986).

If there is not enough memory available for Floyd’s algorithm, PROC SURVEYSELECT switches to the sequential algorithm of Fan, Muller, and Rezucha (1962), which requires less memory but might require more time to select the sample. When PROC SURVEYSELECT uses the alternative sequential algorithm, it writes a note to the log. To request the sequential algorithm, even if enough memory is available for Floyd’s algorithm, you can specify METHOD=SRS2 in the PROC SURVEYSELECT statement.