Dear Statalisters,
I have been trying to decompose the corrected version of the concentration index suggested by Erreygers (2009) based on the following formula, CI=8*Cov(h,R). where CI=concentration index, h=the health variable of interest (in this case, dummy variable=1 if individual had 4 or more antenatal care visits during pregnancy and 0 otherwise), R=the fractional rank in the socioeconomic status distribution, and Cov(h, R) is the covariance between the health outcome and the rank. I am not too sure if i am doing this right and would greatly appreciate any help.
I have been trying to follow the procedures laid out in O'Donnell, O., van Doorslaer, E., Wagstaff, A., & Lindelow, M. (2008) and modifying to suit the CI formula as given above but not too sure if i am doing this right. Below, is a copy of what i am doing and would greatly appreciate if anyone can peer review this code to find any mistakes i might be making. Thank you for your time and help.
***********************************
NB: pnc_4vismore is the outcome variable; a binary variable =1 if 4 or more antenatal care visits and 0 otherwise. Analysis is based on Demographic and health survey data for Zimbabwe (2005-2006)
***code start here
use "$inpath/zwe_inequalities_mhc", clear
***CONCENTRATION INDEX - CORRECTED VERSION
egen raw_rank=rank(wealth_score), unique
sort raw_rank
quietly summ sweight
gen wi=sweight/r(sum)
gen cumsum=sum(wi)
gen wj=cumsum[_n-1]
replace wj=0 if wj==.
gen rank=wj+0.5*wi
drop raw_rank wi cumsum wj
qui sum pnc_4vismore [aw=sweight]
scalar mean=r(mean)
cor pnc_4vismore rank [aw=sweight], covariance
sca CI=8*r(cov_12)
display "concentration index by convenient covariance method", CI
***Computing the semi-elasticities, CI and contributions of each factor
clear matrix
global X "wealthq1 wealthq2 wealthq3 wealthq4 age20to24 age25to29 age30to34 age35to39 age40to44 age45to49 educ_primary educ_secondary marstat_marr marstat_sep woman_working religion_christian fnews fradio family_plan preg_prev_terminated dum_urban region1 region2 region3 region4 region5 region6 region7 region8 region9"
regress pnc_4vismore $X [pw=sweight], robust cluster(psu)
*******decomposition starts here
foreach x of global X {
qui {
scal b_`x'=_b[`x']
corr rank `x' [aw=sweight], c
sca cov_`x'=r(cov_12)
sum `x' [aw=sweight]
sca elas_`x'=(b_`x'*r(mean))
sca CI_`x'=8*cov_`x'
sca con_`x'=4*(elas_`x'*CI_`x')
sca prcnt_`x'=(con_`x'/CI)*100
}
di "`x' elasticity:", elas_`x'
di "`x' concentration index:", CI_`x'
di "`x' contribution:", con_`x'
di "`x' percentage contribution:", prcnt_`x'
matrix Aaa = nullmat(Aaa) \ ///
(elas_`x', CI_`x', con_`x', prcnt_`x')
}
matrix rownames Aaa= $X
matrix colnames Aaa = "Elasticity""CI""Absolute""%"
matrix list Aaa, format(%8.4f)
*********
Thank you for your help.
I have been trying to decompose the corrected version of the concentration index suggested by Erreygers (2009) based on the following formula, CI=8*Cov(h,R). where CI=concentration index, h=the health variable of interest (in this case, dummy variable=1 if individual had 4 or more antenatal care visits during pregnancy and 0 otherwise), R=the fractional rank in the socioeconomic status distribution, and Cov(h, R) is the covariance between the health outcome and the rank. I am not too sure if i am doing this right and would greatly appreciate any help.
I have been trying to follow the procedures laid out in O'Donnell, O., van Doorslaer, E., Wagstaff, A., & Lindelow, M. (2008) and modifying to suit the CI formula as given above but not too sure if i am doing this right. Below, is a copy of what i am doing and would greatly appreciate if anyone can peer review this code to find any mistakes i might be making. Thank you for your time and help.
***********************************
NB: pnc_4vismore is the outcome variable; a binary variable =1 if 4 or more antenatal care visits and 0 otherwise. Analysis is based on Demographic and health survey data for Zimbabwe (2005-2006)
***code start here
use "$inpath/zwe_inequalities_mhc", clear
***CONCENTRATION INDEX - CORRECTED VERSION
egen raw_rank=rank(wealth_score), unique
sort raw_rank
quietly summ sweight
gen wi=sweight/r(sum)
gen cumsum=sum(wi)
gen wj=cumsum[_n-1]
replace wj=0 if wj==.
gen rank=wj+0.5*wi
drop raw_rank wi cumsum wj
qui sum pnc_4vismore [aw=sweight]
scalar mean=r(mean)
cor pnc_4vismore rank [aw=sweight], covariance
sca CI=8*r(cov_12)
display "concentration index by convenient covariance method", CI
***Computing the semi-elasticities, CI and contributions of each factor
clear matrix
global X "wealthq1 wealthq2 wealthq3 wealthq4 age20to24 age25to29 age30to34 age35to39 age40to44 age45to49 educ_primary educ_secondary marstat_marr marstat_sep woman_working religion_christian fnews fradio family_plan preg_prev_terminated dum_urban region1 region2 region3 region4 region5 region6 region7 region8 region9"
regress pnc_4vismore $X [pw=sweight], robust cluster(psu)
*******decomposition starts here
foreach x of global X {
qui {
scal b_`x'=_b[`x']
corr rank `x' [aw=sweight], c
sca cov_`x'=r(cov_12)
sum `x' [aw=sweight]
sca elas_`x'=(b_`x'*r(mean))
sca CI_`x'=8*cov_`x'
sca con_`x'=4*(elas_`x'*CI_`x')
sca prcnt_`x'=(con_`x'/CI)*100
}
di "`x' elasticity:", elas_`x'
di "`x' concentration index:", CI_`x'
di "`x' contribution:", con_`x'
di "`x' percentage contribution:", prcnt_`x'
matrix Aaa = nullmat(Aaa) \ ///
(elas_`x', CI_`x', con_`x', prcnt_`x')
}
matrix rownames Aaa= $X
matrix colnames Aaa = "Elasticity""CI""Absolute""%"
matrix list Aaa, format(%8.4f)
*********
Thank you for your help.
Comment