在计算theil的时候查找了很多资料,最后在爱问上找了【海上西瓜】的回答,分享上来给各位原文链接:https://iask.sina.com.cn/b/21595148.html
安装stata后,在命令行键入“ ssc install ineqdeco” ,回车开始安装。
安装完成后输入你的数据,var为要研究的变量,group为分组变量,
输入命令“ ineqdeco var , by(group)” ,
输出结果中“GE(1)”即为泰尔系数,
Within-group inequality, GE_W(a) 和Within-group inequality, GE_W(a)
表内的GE(1)项目分别为组内和组间的泰尔系数。
例如:sysuse auto , replace br price rep78 /* 如果您是初学者,看一下数据格式 */
ineqdeco price ,by ( rep78 ) /* 根据维修情况分组,计算车辆价格的不平等系数,为泰尔系数GE(1) */
Generalized Entropy indices GE(a), where a = income difference sensitivity parameter, and Gini coefficient----------------------------------------------------------------------
All obs | GE(-1) GE(0) GE(1) GE(2) Gini----------+-----------------------------------------------------------
| 0.08013 0.08416 0.09355 0.11065 0.22962---------------------------------------------------------------------
-Within-group inequality, GE_W(a)----------------------------------------------------------
All obs | GE(-1) GE(0) GE(1) GE(2)----------+-----------------------------------------------
| 0.07821 0.08236 0.09185 0.10905----------------------------------------------------------
Between-group inequality, GE_B(a):----------------------------------------------------------
All obs | GE(-1) GE(0) GE(1) GE(2)----------+-----------------------------------------------
| 0.00192 0.00180 0.00169 0.00160----------------------------------------------------------应该可以帮到你!。


雷达卡






京公网安备 11010802022788号







