Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The SURVEYSELECT Procedure

Stratified Sampling with Control Sorting

The next sample design for the customer satisfaction survey uses stratification by State. The sampling frame is also sorted by Type and Usage before sample selection, to provide additional control over the distribution of the sample. Customers are then selected by systematic random sampling within strata. The following PROC SURVEYSELECT statements select a probability sample of customers from the Customers data set using this design.

   title1 'Customer Satisfaction Survey';
   title2 'Stratified Sampling with Control Sorting';
   proc surveyselect data=Customers method=sys seed=1234
         rate=.02 out=SampleControl;
      strata State;
      control Type Usage;
   run;

The STRATA statement names the stratification variable State. The CONTROL statement names the control variables Type and Usage. In the PROC SURVEYSELECT statement, the METHOD=SYS option requests systematic random sampling. The SEED=1234 option specifies the initial seed for random number generation. The RATE=.02 option specifies a sampling rate of 2% for each stratum.

Figure 63.7 displays the output from PROC SURVEYSELECT, which summarizes the sample selection. A sample of 271 customers is selected, using systematic random sampling within strata determined by State. The sampling frame Customers is sorted by control variables Type and Usage within strata. The type of sorting is serpentine, which is used by default since SORT=NEST is not specified. See the section "Sorting by CONTROL Variables" for a description of serpentine sorting. The output data set SampleControl contains the sample of customers.

Customer Satisfaction Survey
Stratified Sampling with Control Sorting

The SURVEYSELECT Procedure

Selection Method Systematic Random Sampling
Strata Variable State
Control Variables Type
  Usage
Control Sorting Serpentine

Input Data Set CUSTOMERS
Random Number Seed 1234
Stratum Sampling Rate 0.02
Number of Strata 4
Total Sample Size 271
Output Data Set SAMPLECONTROL

Figure 63.7: Sample Selection Summary

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.