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: Transforming data - horizontal to vertical


From   lreine ycenna <[email protected]>
To   [email protected]
Subject   st: Transforming data - horizontal to vertical
Date   Wed, 11 May 2011 09:43:11 +0100

Hi all,
I need to re-convert my data into the stata format (vertical). What
command do I use?

I have a list of countries and variables to sort.

My data look like this currently:

var year USA AUS
x 1997  0.1   0.1
x 1998  0.2   0.5
x 1999  0.1   0.3
x 2000  0.3   0.3

I need it to look like this:

year country x
1997 USA   0.1
1998 USA  0.2
1999 USA  0.1
2000 USA  0.3
1997 AUS  0.1

etc..

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