Announcement

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

  • Concentration curves of a dichotomous variable

    Click image for larger version

Name:	Graph error.png
Views:	2
Size:	9.4 KB
ID:	1507880 Hi, I am new to the forum and stata itself. I need help in drawing a concentration curve. I am trying to graph prenatal care according to the wealth index. My prenatal care is a dichotomous variable ("yes/no") and after using the following code:


    glcurve prenatal_care [aw=weight], glvar(yord) pvar(rank) sortvar(wealth) lorenz

    I get a graph that is kinked and has jumps, instead of a smooth curve. Could someone please guide me on how to fix it. The data is from the DHS.

    Many thanks.

    I have also added the attatchment

    I have also attached the output of the graph Graph error.gph
    Last edited by Zahrah Rafique; 16 Jul 2019, 07:07.

  • #2
    Dear Zahrah
    I do not see anything wrong with your syntax. I think the problem has to do with the variable Wealth.
    If I remember correctly, DHS do not have an income variable, but provides a wealth index that is constructed using PCA type of strategy based on assets and other households characteristics. The variable you are using, wealth, is probably the constructed variable that classifies households into 5 groups (quintiles)
    Because this variable is categorical, the resulting Concentration index will be a step function, as you see.
    Perhaps an alternative, that would better fit your needs, is to use the continuous variable that should also be available in the DHS dataset, and use that instead of wealth in "sortvar()".
    HTH
    Fernando

    Comment


    • #3
      Hi. It worked! Turns out the problem was that i was using a categorical variable. Many thanks!

      Comment


      • #4
        Originally posted by Zahrah Rafique View Post
        Hi. It worked! Turns out the problem was that i was using a categorical variable. Many thanks!
        Can you tell me which varaible you choose, because i am also having the same issue with my ANC variable using DHS dataset for sorting by wealth index

        Comment

        Working...
        X