Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: How to graph


From   Carlos Avellaneda Suárez <[email protected]>
To   [email protected]
Subject   Re: st: How to graph
Date   Tue, 18 Mar 2014 15:44:11 -0500

Hi Kisil,
One solution is to collapse your dataset. Here is an example you can
reproduce in a do-file:
*****Begin Example*****
webuse nlswork
preserve
collapse (p10) p10=ln_wage (p20) p20=ln_wage ///
(p30) p30=ln_wage (p40) p40=ln_wage (p50) p50=ln_wage ///
(p60) p60=ln_wage (p70) p70=ln_wage (p80) p80=ln_wage ///
(p90) p90=ln_wage , by(year)
tsset year
tsline p*
restore
*****End*****
By the way, why would you estimate a percent change in a log variable?
Remember that the first difference of the logarithm of a variable
approximates to the percentage change of the unaltered variable. With
the previous example, you just have to generate new variables of the
first difference of each percentile.
Hope this helps.
Carlos

2014-03-18 13:41 GMT-05:00 Kisil ktl <[email protected]>:
> Dear statalist,
>
> I work on a data set that has log wage information of workers through six years.
> In order to show how log wage at different percentiles changed between
> the years 2000 and 2005, I want to make a graph that has
> 10th,20th,..,90th percentiles on the x-axis and corresponding
> percentage log wage changes on the y-axis.
> For example, the graph should show how many percent did the log wage
> of a worker at 90th or 10th percentile of the wage distribution change
> between 2000 and 2005.
> egen rank = rank(wage)
> This command computes the percentile ranks of workers with respect to
> their log wages, but I could not do the rest of it. How can I make
> this kind of a graph?
>
> Best regards
> Kisil
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index