When I run proc means, the standard deviations are very high. The variables in the statement below are all binary, so the std should be sqrt(p*(1-p)), as shown in the table below. Instead they are orders of magnitude bigger. I get the same problem with continuous variables; stata delivers much smaller std errors. No-one else seems to have this problem, and Ive been having it for years, so it has to be something I have misunderstood about proc means.I t might have something to do with the weight statement. The weights post_wt range in size from 350 to 33500. Please let me know how to get the correct std dev. I'm getting tired of porting my sas data sets to stata. THanks J Variable N Mean Std Dev Minimum Maximum sqrt(p(1-p)) PregMonth 296527 0.006651 5.973354 0 1 0.081281 PregBirth 296527 0.003967 4.619279 0 1 0.062856 MarrMonth 296527 0.006756 6.020052 0 1 0.081917 ShotGunMar 296527 0.00106 2.391512 0 1 0.032542 20462 proc means data=sinwom; *noprint;; 20463 var PregMonth PregBirth MarrMonth ShotGunMar; 20464 *output out=temp mean = PregMonth PregBirth MarrMonth ShotGunMar; 20465 weight post_wt; 20466 *proc print; 20467 run; NOTE: There were 296527 observations read from the data set WORK.SINWOM. NOTE: PROCEDURE MEANS used (Total process time): real time 0.19 seconds cpu time 0.29 seconds
... View more