<p>请问sas means的过程步weight命令是怎么用的,比如求X1,X2,X3市值收益率,三个的市值分别为C1,C2,C3(变量名C),那输入命令时是:</p><p>proc means data=ret; var X;weight C;呢,还是需要生成另一个变量W,W=C1/(C1+C2+C3),再weight W;呢?多谢!!!</p>
no difference, i think, since C1+C2+C3 is a constant in your case.<br/>weighted mean =( sum of Wi*Xi)/(sum of Wi) where Xi=ith X and Wi=i th W. the default weight = 1