Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: xtline with title containing variable value


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: xtline with title containing variable value
Date   Wed, 10 Aug 2011 17:58:18 +0100

This isn't primarily a question about -xtline-, but more one about
labelling values.

-egen, group()- has a -label- option which you can use to label
values. This is documented in the help for -egen-.

Nick

On Wed, Aug 10, 2011 at 5:36 PM, Tanuku AP <tanuku.ap@hotmail.com> wrote:

> I looked through the list archives - there were similar problems discussed several years ago but not the same problem that I have.  The manuals weren't very helpful to me either.
>
> I have a panel data set:
>
> egen panelid = group(gutype gucode)
> xtset panelid year
>
>
> panelid was generated to ensure consecutive numbering.  I use --xtline-- to plot 30 panels at a time.
>
>
> forvalues i=1(30)930 {
>
>     local j = `i' + 29
>
>     xtline hhi if panelid>=`i' & panelid<=`j'
>
> }
>
>
> The title of each panel chart shows the panelid.  How can replace it with other row variables viz.  gucode and gutype?

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index