Statalist The Stata Listserver


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

st: panel data management: columns to rows


From   Krishna Naidoo <[email protected]>
To   [email protected]
Subject   st: panel data management: columns to rows
Date   Tue, 13 Jun 2006 10:09:33 -0700 (PDT)

I have a simple question about rearranging my
(balanced) panel dataset. It is currently in the form:

date         id       var1    var2    var3 
1996q1       1         56      37      83
1996q1       2         67      44      77
1996q1       3         55      67      90
1996q2       1         36      45      88
1996q2       2         68      41      92
...
2005q4       3         73      85      67

I would like to obtain separate blocks of data, one
for each variable, with either the date in columns and
id in rows or the other way around. Ultimately I need
to export this from Stata into excel into separate
spreadsheets, one each for var1 var2 etc, that look
like (of course with the relevan values in):

             id1    id2    id3
1996q1       
1996q2       
1996q3       
...
2005q4  

Or with dates and ids the otheer way around would be
fine too. I've been trying to do this with tabstat
manually and copy and past out but it is extremely
time consuming as I have a large dataset. Any
suggestions as to how to do this efficiently would be
appreciated.

Yours,
Krishna

__________________________________________________
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/



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