/* This sas program will produce the estimates in Example 6.6 of Sampling: Design and Analysis by Sharon L. Lohr, using Version 7 of SAS */ /* Author: S. Lohr, 3/99. Copyright (c) Sharon L. Lohr, 1999*/ options ls=78 ps=35; data classes; input classid class size hours; wt = 647/25; /* weight is (M_i/m_i)/(n * psi_i) Here, (size/5)/(5*size/647) */ cards; 1 12 24 2 1 12 24 3 1 12 24 2.5 1 12 24 3 1 12 24 1.5 2 14 100 2.5 2 14 100 2 2 14 100 3 2 14 100 0 2 14 100 0.5 3 14 100 3 3 14 100 0.5 3 14 100 1.5 3 14 100 2 3 14 100 3 4 5 76 1 4 5 76 2.5 4 5 76 3 4 5 76 5 4 5 76 2.5 5 1 44 4 5 1 44 4.5 5 1 44 3 5 1 44 2 5 1 44 5 ; proc print data=classes; /* We leave out the 'total' option because sampling is with replacement */ proc surveymeans data=classes nobs mean sum; var hours; cluster classid; weight wt;