Chapter Contents |
Previous |
Next |
The SURVEYSELECT Procedure |
The data set HospitalFrame contains all hospitals in the first geographical region of this state.
data HospitalFrame; input Hospital$ Type$ SizeMeasure @@; if (SizeMeasure < 20) then Size='Small '; else if (SizeMeasure < 50) then Size='Medium'; else Size = 'Large '; datalines; 034 Rural 0.870 107 Rural 1.316 079 Rural 2.127 223 Rural 3.960 236 Rural 5.279 165 Rural 5.893 086 Rural 0.501 141 Rural 11.528 042 Urban 3.104 124 Urban 4.033 006 Urban 4.249 261 Urban 4.376 195 Urban 5.024 190 Urban 10.373 038 Urban 17.125 083 Urban 40.382 259 Urban 44.942 129 Urban 46.702 133 Urban 46.992 218 Urban 48.231 026 Urban 61.460 058 Urban 65.931 119 Urban 66.352 ;
In the SAS data set HospitalFrame, the variable Hospital identifies the hospital. The variable Type equals `Urban' if the hospital is located in an urbanized area, and `Rural' otherwise. The variable SizeMeasure contains the hospital's size measure, which is constructed from past data on service utilization for the hospital together with the desired sampling rates for each service. This size measure reflects the amount of relevant survey information expected from the hospital. Refer to Drummond et al. (1982) for details on this type of size measure. The variable Size equals `Small', `Medium', or `Large', depending on the value of the hospital's size measure.
The following PROC PRINT statements display the data set Hospital Frame.
title1 'Hospital Utilization Survey'; title2 'Sampling Frame, Region 1'; proc print data=HospitalFrame; run;Output 63.2.1: Sampling Frame
title1 'Hospital Utilization Survey'; proc surveyselect data=HospitalFrame method=pps_brewer seed=48702 out=SampleHospitals; size SizeMeasure; strata Type Size notsorted; run;
The STRATA statement names the stratification variables Type and Size. The NOTSORTED option specifies that observations with the same STRATA variable values are grouped together but are not necessarily sorted in alphabetical or increasing numerical order. In the HospitalFrame data set, Size = `Small' precedes Size = `Medium'.
In the PROC SURVEYSELECT statement, the METHOD=PPS_BREWER option requests sample selection by Brewer's method, which selects two units per stratum with probability proportional to size. The SEED=48702 option specifies '48702' as the initial seed for random number generation. The SIZE statement specifies the size measure variable. It is not necessary to specify the sample size with the N= option, since Brewer's method always selects two units from each stratum.
Figure 63.2.2 displays the output from PROC SURVEYSELECT. A total of 8 hospitals were selected from the 4 strata. The data set SampleHospitals contains the selected hospitals.
Output 63.2.2: Sample Selection Summary
|
title1 'Hospital Utilization Survey'; title2 'Sample Hospitals, Region 1'; proc print data=SampleHospitals; run;Output 63.2.3: Sample Hospitals
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.