各位同学老师好,我 根据VAR1分组,求VAR2的加权平均数,VAR3是权重。
我使用如下命令 bysort VAR1:egen waverage=mean(VAR2)[w=VAR3]
为什么stata反馈错误:weights not allowed
r(101);
关于r(101)的解释:
Keywords: r(101)
Search: (1) Official help files, FAQs, Examples, SJs, and STBs
Search of official help files, FAQs, Examples, SJs, and STBs
[P] error . . . . . . . . . . . . . . . . . . . . . . . . Return code 101
varlist not allowed;
weights not allowed;
in range not allowed;
if not allowed;
= exp not allowed;
using not allowed;
Certain commands do not allow an if exp or other elements of the
language. The message specifies which item in the command is not
allowed. See the command's syntax diagram. For example, append
does not allow a varlist; perhaps, you meant to type merge.
(end of search)
请指教,谢谢!