Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: multiple line graph of long data


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: multiple line graph of long data
Date   Tue, 18 Nov 2003 09:31:18 -0000

I think the best short answer is -xtline-. (You 
may need to -update- and -tsset- first.) 

A longer answer reviewing possibilities is in the archives at 
http://www.stata.com/statalist/archive/2003-10/msg00403.html

Nick 
[email protected] 

Yong-Seok Choi
 
> I have a very quick question regarding line graph in Stata ver.8.
> Here is the structure of the data (a simple panel)
> 
> country		year		gdp
> a		1970		1
> a		1971		2
> .		.		.
> a		1999		18
> b		1970		2
> b		1971		5
> .		.		.
> b		1999		15
> c		1970		5
> c		1971		8
> .		.		.
> c		1999		10
> 
> Now, I would like to have the (connected) line graph for 
> each country's gdp on year 1970-1999
> that is, three lines for three country on the same graph in 
> this case
> 
> I know that I can do this by reshaping the data into wide 
> format, but I have lots of countries and variables which
> makes reshaping very unattractive.
> Can I do this with this long panel data?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index