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: xtline charts for large panel set
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: xtline charts for large panel set
Date
Wed, 3 Aug 2011 22:05:59 +0200
On Wed, Aug 3, 2011 at 9:42 PM, Tanuku AP wrote:
> I have a data set with roughly 3000 units. The panel ids are not consecutively numbered. I'd like to draw --xtline-- charts (w/out overlay) with roughly 20 charts in one frame.
>
> If the panel ids were consecutive I could have used a loop with something like so:
>
> xtline pvar if panelid > `x' & panelid < `x'+ 20 (PSEUDOCODE)
> where x is the loop variable
>
>
> TWO QUESTIONS:
> (1) How can I draw --xtline-- charts for the 3000 units with 20 units at a time
> (2) Is there a way to generate another variable that assigns consecutive numbers to panel ids
(2) use the -group()- egen-function, see -help egen-.
(1) replace -& panelid < `x'+ 20- with -& panelid < `=`x'+ 20'-, see:
<http://www.maartenbuis.nl/example_faq/index.html#`='>
Hope this helps,
Maarten
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/