Announcement

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

  • What is the command to make bar chart, and conc curve and conc Index for the whole population

    Dear

    I am using DHS dataset .

    I have made the Bar graph and con Curve and index of the sample data.

    But dont know the command to make bar chart, and conc curve and conc Index for the whole population by using the DHS data set.

    How to insert weights in commands for concentration curve and Concentration index.


    Please help me.

    Thanks
    Sabbir

  • #2
    You might already know it, but if not, here is a good site to begin with: https://www.stata.com/support/faqs/g.../stata-graphs/

    Comment


    • #3
      Look at the User Guide. Also, check out the Graphics manual (provided in pdf form - open Help, pdf documentation).

      Comment


      • #4
        graph bar will take a [pweight =] argument. Also "search conindex" and "ssc des conindex" will turn up a very capable command
        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment


        • #5
          Dear Ahmed,

          I do not know how your data set may look like but you can try these commands to make what you are looking for:

          Bar graphs of mean of variable of interest. I provide these commands because you are working on concentration curves and indices so you are possibly using mean and quintile.
          Code:
          xtile quintile = x [pw=wt], nq(5)                /* (weighted) quintile groups by living standards measure */
          tabstat y [aw=wt], by(quintile) stats(mean)        /* mean of variable of interest by quintile */
          graph bar (mean) y [aw=wt], over(quintile)
          If you want to plot concentration curves for two variables, you can try this:
          Code:
          glcurve y [aw=wt], glvar(yord) pvar(rank) sortvar(x) replace by(z) split lorenz nograph
          
          ge rank2=rank
          lab var yord_0 "conc curve male"
          lab var yord_1 "conc curve female"
          lab var rank "cumul share (poorest first)"
          lab var rank2 "line of equality"
          twoway (line yord_0 rank , sort clwidth(medthin) clpat(solid) clcolor(orange)) ///
              (line yord_1 rank, sort clwidth(medthin) clpat(longdash) clcolor("153 204 0")) ///
              (line rank2 rank , sort clwidth(medthin) clcolor(gray)) ///
              , ytitle(cumulative share of malnutrition, size(medsmall)) ///
              yscale(titlegap(5))  xtitle(, size(medsmall)) legend(rows(5)) xscale(titlegap(5)) ///
              legend(region(lwidth(none))) plotregion(margin(zero)) ysize(5.75) xsize(5) plotregion(lcolor(none))
              graph export "cc curves male and female.emf" , replace
          where y is your variable of interest, x is your living standards measure and z could be gender. You also can see that sample weight is applied in all commands provided. Note that the glcurve command only gives you concentration curves without labeling and color.

          Hope this helps.

          Dung Le


          Comment


          • #6
            Hi Dung

            please i want to drow a concentration curve of one variable of interest i ve followed the code that you 've provided but i dont understand the variable "yyord" is it a variable that you create of it should be avalaible on the data

            Comment


            • #7
              Originally posted by Meriem OUD View Post
              Hi Dung

              please i want to drow a concentration curve of one variable of interest i ve followed the code that you 've provided but i dont understand the variable "yyord" is it a variable that you create of it should be avalaible on the data
              Hi Meriem OUD,

              In fact, the glcurve command will automatically create three variables; yord_0, yord_1, and rank for you. In the case if you do not know what yord is, it stands for y-ordinates for men and women (you can see I labeled yord_0 and yord_1 in the previous post). You can give any name to y-ordinates. Alternatively, you can also manually create the three above-mentioned variables without using glcurve but it require a bit of work.

              Cheers,

              Dung Le

              Comment


              • #8
                Hi Dung,
                I am following your code for district-level analysis and measuring the concentration curve and generalised concentration index. In the district level every variable is continuous. And another query is the what should be X in the given codes?

                Comment


                • #9
                  Originally posted by DAS SUMAN View Post
                  Hi Dung,
                  I am following your code for district-level analysis and measuring the concentration curve and generalised concentration index. In the district level every variable is continuous. And another query is the what should be X in the given codes?
                  Hi Suman,

                  The x variable in my case is household wealth constructed using PCA method. Then the x variable is further measured as 5 quintiles (i.e. 1st, 2nd ... 5th) as I showed in #5. Another way to generate concentration curves is to use DASP Stata package, which can be found at: http://dasp.ecn.ulaval.ca.

                  Cheers,

                  Dung Le

                  Comment

                  Working...
                  X