集中指数菜鸟,也没搞如何利用集中指数对每个变量内部的分解,但是初步通过世银的的书学习了CI的分解。
贴出do file,希望有大佬能提供stata的WDW分解法或者rif分解法。
1.这一步是计算CI,不会直接help conindex就行。
conindex noh1 [pw=INDV_weight], rank(perspend1) truezero
里面加compare就是每个组内的...
2.CI分解,来源于世银的书,书名《Analyzing Health Equity Using Household Survey Data》,第十三章有详细的代码。
global X gender brithday marrystatus workstatus surrending healthselfassessment area edu insurence chronic disease iadls badls
qui sum noh1 [aw=weight]
sca m_y=r(mean)
qui regr noh1 $X [aw=weight] //
qui margins , dydx(*) post
foreach x of varlist $X {
sca b_`x'=_b[`x']
}
foreach x of varlist $X {
{
conindex `x' [pw=INDV_weight], rank(perspend1) truezero
sca CI_`x' = r(CI)
sum `x' [aw=weight]
sca elas_`x' = 4*(b_`x' * r(mean))
sca contri_`x' = elas_`x' * CI_`x'
sca prcnt_`x' = (contri_`x'/CI)*100
}
di "`x' elasticity:", elas_`x'
di "`x' concentration index:", CI_`x'
di "`x' contribution:", contri_`x'
di "`x' percentage contribution:", prcnt_`x'
}
run一下,跑出来就是CI的分解内容,但这玩意和寻常论文看到的还是有差距,每个变量值的贡献度等等都没有。望大佬解决。
gender elasticity: -.00010404
gender concentration index: -.00150717
gender contribution: 1.568e-07
gender percentage contribution: .00023882
brithday elasticity: .00064628
brithday concentration index: -.00433838
brithday contribution: -2.804e-06
brithday percentage contribution: -.00427035
......


雷达卡






京公网安备 11010802022788号







