Hi Everyone,

I am trying to create a graph with two concentration indices using the CONINDEX command, plotting out-of-pocket expenditures against households ranked by household expenditure (see example graph below). I used the following two commands to create the two graphs for 2014 and 2019:
conindex ooph if year==2014, rankvar(tot_hhexp) truezero svy graph ytitle(Cumulative share of household OOPE) xtitle(Cumulative share of households ranked by THCE)

conindex ooph if year==2019, rankvar(tot_hhexp) truezero svy graph ytitle(Cumulative share of household OOPE) xtitle(Cumulative share of households ranked by THCE)



Does anyone have any advice for how these two graphs can be merged into one single graph displaying the two concentration indices for the two years as shown in the third graph below?

I have also tried the following command: conindex ooph, rankvar(tot_hhexp) truezero svy graph ytitle(Cumulative share of household OOPE) xtitle(Cumulative share of households ranked by THCE) compare(year) though while this gives me two separate concentration indices, it unfortunately gives me one single graph, merging data for the two years.


I would be grateful for any ideas!

Thank you so much in advance,
Hannah






Array Array

Array