Announcement

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

  • Graphing the results of the "ginidesc" command (Gini coefficient) by year.

    Hi!
    I estimated the Gini coefficients by year with:
    Code:
     ginidesc income, by(year)
    Click image for larger version

Name:	Screen Shot 2016-10-16 at 4.30.43 AM.png
Views:	1
Size:	15.7 KB
ID:	1360387


    After obtaining these results I would like to plot them in the same way I did with average incomes to get something like this:

    Click image for larger version

Name:	grafico2.png
Views:	1
Size:	26.4 KB
ID:	1360389

    The only way I can think it could be done is by creating a constant (within varlist) containing the Gini_k just like I did with
    Code:
     egen meanincome = mean(income), by(year)
    and then
    Code:
    egen tag = tag(year)
    twoway connected meanincome year if tag
    but the egen command doesn't work with "ginidesc" as it does with "mean".

    Also after the ginidesc results "Stored in matrix" is displayed. I thought I could access those results and somehow create the constant variable, but I didn't get anything by running
    Code:
    return list
    Any help would be greatly appreciated!
    Vicente

  • #2
    Please guys, I still can't find a solution.

    Comment


    • #3
      you don't show your data (use dataex if you are going to please - see the FAQ) nor the command you used (there is no ginidesc command but I'm guessing you used ineqdeco from the ginidesc package????); please read the FAQ and then re-ask following the FAQ

      my current guess is that you will need to run ineqdeco (if that is the command you are using) for each year and save the returned result you want (presumably "r(gini)") and then do your graph

      Comment


      • #4
        GINIDESC, at least the version I have from SCC, does not return its results.
        An alternative is to install EGEN_INEQUAL from SSC and try this
        Code:
        use http://www.stata-press.com/data/r9/nlswork , clear
        gen w = exp(ln_wage)
        egen gini = inequal(w) , by(year) index(gini)
        scatter gini year ,connect(l) sort

        Comment

        Working...
        X