全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2513 4
2016-02-28
是这样的一个语句:tab  flo_rage_1 [aw=wp] if childage_1<10 & childage_2<10 & twins==1
运行的时候出现了这样的错误:wp not found   
                                                  r(111);
    这是什么意思?求大神解答,谢谢

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2016-2-28 21:39:21
wp not found  就是加权变量wp没有被定义。
去掉[aw=wp]这个计算加权frequency的选项,除非特殊目的,一般不用。

aweights, or analytic weights, are weights that are inversely proportional to the variance of an observation; that is, the variance of the jth observation is assumed to be sigma^2/w_j, where w_j are the weights. Typically, the observations represent averages and the weights are the number of elements that gave rise to the average. For most Stata commands, the recorded scale of aweights is irrelevant; Stata internally rescales them to sum to N, the number of observations in your data, when it uses them.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-2-29 17:44:33
wisdommingli 发表于 2016-2-28 21:39
wp not found  就是加权变量wp没有被定义。
去掉[aw=wp]这个计算加权frequency的选项,除非特殊目的,一般 ...
请问这个加权变量一般是用来干什么的?我是新手,不太懂,谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-3-1 10:55:18
阿ken哥 发表于 2016-2-29 17:44
请问这个加权变量一般是用来干什么的?我是新手,不太懂,谢谢
简单的说很多时候就是用来修正样本和总体之间的差别。比如总体有20男10女,但是样本只有1男1女,那么这个时候给样本里男性观测值两倍于女性观测值的权重,样本就能更符合总体。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-3-3 21:27:49
夏目贵志 发表于 2016-3-1 10:55
简单的说很多时候就是用来修正样本和总体之间的差别。比如总体有20男10女,但是样本只有1男1女,那么这个 ...
好的,太棒啦!谢谢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群