可以尝试在stata里面 help egen inequal
里面有一个计算kakwani指数的选项
附:egen inequal指令的选项
rmd the relative mean deviation
cov the coefficient of variation
sdl the standard deviation of logs
gini the Gini index
mehran the Mehran index
piesch the Piesch index
kakwani the Kakwani index
theil Theil entropy index
mld the mean log deviation
entropy generalized entropy measure (GE -1)
half generalized entropy measure (GE 2)