BookmarkSubscribeRSS Feed
Julie4
Fluorite | Level 6

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)

Julie4_1-1634743955888.png


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)

Julie4_0-1634743935790.png


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

 

 

 

2 REPLIES 2
ChrisNZ
Tourmaline | Level 20

Few people here know strata. Please describe the calculations needed.

Julie4
Fluorite | Level 6

I attached the file that I found below and contents below are the calculations of Concentration index and HIwv.

 

This is about Concentration Index.

Julie4_0-1635123966593.png

 

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'.

Julie4_1-1635124236901.png

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1463 views
  • 0 likes
  • 2 in conversation