一、删除hhwage_inc缺失值所在的样本数据
. gen missing1=missing(hhwage_inc)
. keep if missing1==0
(36,456 observations deleted)
. drop missing1
二、计算省份的收入平均值
.by prov_code,sort: egen pvty_depth=mean(total_income)
三、计算相对贫困深度.gen prty_depth=.
. replace prty_depth=0 if total_income>= prov_mean
(23,664 real changes made)
. replace prty_depth= (prov_mean-total_income)/prov_mean if total_income< prov_mean
(46,888 real changes made)


雷达卡



京公网安备 11010802022788号







