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]

st: stack time-series to paneldata


From   Max Roser <[email protected]>
To   [email protected]
Subject   st: stack time-series to paneldata
Date   Wed, 11 May 2011 21:24:57 +0200

Olá,
have a small question concerning the input of data.
I want to stack Time-series to get a paneldata set.
So what I'd need is something between the stack and the reshape commands.

To clarify. I have data like this

Year    USA    UK    Brasil

2000    12    12    15
2001    13    12    14
2002    14    13    13

and I want

ID        Year        Women

USA    2000        12
USA    2001        13
USA    2002        14
UK    2000        12
UK    2001        12
UK    2002        13
Brazil    2000    15
Brazil    2001    14
Brazil    2002    13

Does anyone have an idea of how to do that?
(I always make as many year-variables as countries and then stack the
data. Obviously its prone to errors and very unelegant)
I need:
take countries as ids and stack them into year and join the value to id
&  year

Using Stata/IC 10.1 Born June 2010 (for Windows)

Best Regards from Rio de Janeiro, Max


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index