DM 'LOG;CLEAR;OUT;CLEAR'; OPTIONS NODATE NONUMBER NOCENTER PS=54 LS=70; ********************************************************; *** Cluster sample analysis for equal-sized clusters ***; ********************************************************; DATA cluster1; M0 = 400; * number of secondary sampling units (SSUs) in population; n = 8; * number of primary sampling units (PSUs) sampled; m = 4; * number of SSUs in a PSU; wgt = M0/(n*m); DO psu = 1 to n; DO ssu = 1 to m; INPUT trees @@; OUTPUT; END; END; DATALINES; 1 2 4 1 2 0 7 0 2 2 0 0 0 0 2 6 1 16 8 1 2 2 2 0 2 1 0 1 0 0 0 1 ; *** TOTAL = number of PSUs in the population ***; PROC SURVEYMEANS DATA=cluster1 TOTAL=100 MEAN CLM SUM CLSUM; VAR trees; CLUSTER psu; WEIGHT wgt; TITLE 'One-Stage Cluster Sample from Figure 8a'; RUN;