全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1740 3
2009-07-05
* unique rank for each family member (non-hh head or spouse) based on age 每个家庭成员(非户主或配偶)的年龄的排列
sort hhid
by hhid: egen agerk=rank(nh1b_3), unique, if nh1b_1~=1 & nh1b_1~=2
其中nh1b_3是年龄,后面的if条件表示非户主和配偶。
有哪位高手能告知unique是什么意思?
egen 新变量=rank(老变量),unique, if
这个命令的具体含义是什么?小女子先谢谢了。
二维码

扫码加我 拉你入群

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

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

全部回复
2009-7-16 17:37:39
唉。
help吧。
二维码

扫码加我 拉你入群

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

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

2009-7-16 17:50:52
rank(exp) [, [field|track|unique]]   (allows by varlist:)  
creates ranks (within varlist) of exp; by default, equal observations are assigned the average rank.  The field option calculates the field rank of exp: the highest value is ranked 1, and there is no correction for ties.  That is, the field rank is 1 + the number of values that are higher.  The track option calculates the track rank of exp:  the lowest value is ranked 1, and there is no correction for ties.  That is, the track rank is 1 + the number of values that are lower.  The unique option calculates the unique rank of exp: values are ranked 1,...,#, and values and ties are broken arbitrarily.  Two values that are tied for second are ranked 2 and 3.
二维码

扫码加我 拉你入群

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

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

2009-7-16 22:04:38
谢谢可爱的版主。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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