/* This sas program will select a pps sample as in Example 6.2 of Sampling: Design and Analysis by Sharon L. Lohr, using Version 7 of SAS. (The sample will differ from the one chosen in the book; in fact, you will get a different sample every time you run this program.) */ /* Author: S. Lohr, 3/99. Copyright (c) Sharon L. Lohr, 1999*/ options ls=78 ; data classes; input class clssize ; cards; 1 44 2 33 3 26 4 22 5 76 6 63 7 20 8 44 9 54 10 34 11 46 12 24 13 46 14 100 15 15 ; proc print data=classes; /* Select a sample of size 5 with prob proportional to size and with replacement. The units to be selected will be put in file 'mysample'. */ proc surveyselect data=classes out=mysample sampsize=5 method=pps_wr; size clssize; id class; proc print data=mysample; /* Select a sample of size 2 with pps and without replacement. */ proc surveyselect data=classes out=worpl sampsize=2 method=pps_brewer; size clssize; id class; proc print data=worpl;