求助,好像发现一个bug 在proc stdize过程中
sas吧
全部回复
仅看楼主
level 8
这是我的代码:
data test2;
input x w t;
cards;
10 2 1
20 0 1
30 5 1
40 0 1
50 0 1
10 2 2
20 0 2
50 0 2
40 0 2
30 5 2
;
run;
proc stdize data=test2 out=outdata2 outstat=teststat2 vardef=wgt missing=0;
var x;
weight w;
by t;
run;
这是sas9.4生成的teststat2数据集结果:
问题:为什么当t=1时SumWeightsUsed=2,而当t=2时SumweightsUsed=7??
有前辈们能帮忙解答下吗 万分感谢
2024年10月25日 02点10分 1
level 11
真像个bug,换个data input顺序结果就不一样了
按照documentation里的解释,sum of the weight variable (or the sum of NObsUsed ones when there is no weight variable) for all observations used in the analysis
理论上应该去掉0的weight,只剩2个
你这个问题深究一下可以写邮件给sas公司,你如果自己不想写,我可以代劳
2024年10月25日 19点10分 2
感谢老哥,我已经写过邮件在等回复了,万分感谢
2024年10月28日 01点10分
level 8
经官方确认,确实是bug,已在后续版本中更新
2025年02月21日 09点02分 3
牛的xd,给你加个精
2025年02月22日 18点02分
1