Hello.
I have question regarding concentration index(CI) and Horizontal equity Index(HIwv index) sas code.
I have stata code the way to calculate CI(there are 2 ways to calculate CI) and HIwv index but I don't know how to type it in SAS.
Could you please help?
** method 1 (CI)
sum outpts
sca m_y= r(mean)
corr rank outpts [fw=wt], c
sca covph2w = r(cov_12)
sca ci = 2*(covph2w)/m_y
sca list ci
-----------------------------------------------------------------------------------------------------
** method 2 (CI)
qui sum rank [fw=wt]
sca var_rank = r(Var)
ge ihs=2*var_rank*(outpts/m_y)
reg ihs rank [pw=wt]
sca c=_b[rank]
sca list c
summarize seq
sca sigma = r(Var)
gen temp = (2*sigma*inpts) / mean
regress temp seq
regress temp seq [pw=wt], robust cluster(psu)
sca c = _b[seq]
sca list c
regress temp seq [pw=wt]
nlcom ((2*(sigma))/(_b[_con] + 0.5*_b[seq]))*_b[seq]
-----------------------------------------------------------------------------------------------------
* HIwv Index
< 2σr2 [yi/μ - hi/η] = α + βRi + μi >
xi: zinb outpts i.age_g sex i.edu i.sah, inf(age_g sex i.edu i.sah) robust cluster(psu)
predict out_zinb
gen util_c = (util_inc > 300) + (util_inc > 700) + (util_inc > 1000)
gen sah_3 = (sah > 2) + (sah >3)
sort ri
gen need = sum(out_zinb)
gen cum_need = need / need[_N]
label var cum_need "필요의료이용"
twoway (line cum_in seq, clpattern(dot)) ///
(line seq seq)(line cum_need seq, clcolor(pink))
graph export "2005 외래 이용 HIwv곡선.emf", replace
Few people here know strata. Please describe the calculations needed.
I attached the file that I found below and contents below are the calculations of Concentration index and HIwv.
This is about Concentration Index.
This is about HIwv index.
HIwv index is calculated by ‘the difference between the concentration index for actual utilization and that for need-predicted utilization’ and
this is the 'indirect standardization with nonlinear models'.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.