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
... View more