Anyone knows why the deviations from STATA and SAS are different from simple
statements like this? And how can I get the deviation number in SAS to
match that in STATA?
data test;
input x y;
cards;
2 1
3 4
5 3
7 6
4 3
6 6
;
run;
proc means;
weight y;
var x;
run;
/*STATA*/
sum x [fweight=y]