Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Creating panel data?


From   Tutor 2005 UM <[email protected]>
To   <[email protected]>
Subject   RE: st: Creating panel data?
Date   Thu, 20 Apr 2006 18:50:30 +0200

If I understand you correctly you might want to look at -sort- and to
define paneldata use -tsset-.

E.g.

.sort year country
.tsset country year

Hope i could help, steffen

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Friedrich Huebler
> Sent: Thursday, April 20, 2006 6:39 PM
> To: [email protected]
> Subject: Re: st: Creating panel data?
> 
> 
> -help reshape-
> 
> --- Ann Edith Helfman <[email protected]> wrote:
> > Hi,
> > 
> > I'm fairly new to Stata (I have Stata 9) and would like to know 
> > whether there is a way to rearrange the following:
> > 
> > WHAT I HAVE: In Data Editor, my first column lists all of the 
> > countries under a "country" variable.  Each column after that is a 
> > "year" variable
> >   ("1984" through "2000") with the appropriate value for each
> > country.
> > 
> > WHAT I NEED: The data needs to be sorted by country and year.  In 
> > other words, I should see first column "country," second column 
> > "year," and
> > third column those values.
> > 
> > In other words, I need to create panel data with each country having
> > multiple entries by year.  I wouldn't mind doing this in Excel
> > either, 
> > if that works better.
> > 
> > I would greatly appreciate any help with this!
> > 
> > Thank you-
> > 
> > ~Ann
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> *
> *   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/
> 

*
*   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