DM 'LOG;CLEAR;OUT;CLEAR'; OPTIONS NODATE NONUMBER LS=76 PS=54; DATA trees; INPUT photo field @@; N = 100; DATALINES; 10 15 12 14 7 9 13 14 13 8 6 5 17 18 16 15 15 13 10 15 14 11 12 15 10 12 5 8 12 13 10 9 10 11 9 12 6 9 11 12 7 13 9 11 11 10 10 9 10 8 ; /* Use proc surveyreg to estimate the total number of trees */ PROC SURVEYREG DATA=trees TOTAL=100; MODEL field = photo / clparm solution df=23; ESTIMATE 'Total field trees' intercept 100 photo 1130; /* substitute N for intercept, t_x for photo */ ESTIMATE 'Mean field trees' intercept 100 photo 1130 / divisor=100; run;