Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Graph with two concentration indices using CONINDEX

    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






    Click image for larger version

Name:	CO OOP 2019.tif
Views:	1
Size:	35.5 KB
ID:	1636520
    Click image for larger version

Name:	CO OOP 2014.tif
Views:	1
Size:	37.0 KB
ID:	1636521


    Click image for larger version

Name:	Screenshot 2021-11-15 091239.jpg
Views:	1
Size:	18.9 KB
ID:	1636522

  • #2
    Please note the FAQ Advice to state the provenance of community-contributed commands (Advice #12). If you can generate the variables, use twoway. If you have no idea on how the variable is generated, extract the data from the graph as in https://www.statalist.org/forums/for...mbomarginsplot and use twoway to graph.

    Comment

    Working...
    X