Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Panel Data Variable Transpose


From   "Dangol, Ramesh" <rdangol@bsu.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Panel Data Variable Transpose
Date   Tue, 3 Apr 2012 12:27:05 -0400

Hi everyone,
I have a panel data set separated by "ITEM_id", year and FIRM_ID.  I would like to transpose the "ITEM_PER" variable into rows (by year and firm name) and fill in the corresponding rows in the following manner. I also would like to retain the column variable "P_PER".  What would be easiest way to achieve this?

ITEM_ID   year    Firm_ID   P_PER ITEM1  TIEM2  TIEM3  
ITEM1     2002     1        X     X      Y      Z
ITEM2     2002     1        Y     X      Y      Z
TIME3     2002     1        Z     X      Y      Z	

ITEM1     2003     1        X     X      Y      Z
ITEM2     2003     1        Y     X      Y      Z
TIME3     2003     1        Z     X      Y      Z	

ITEM1     2002     2        X     X      Y      Z
ITEM2     2002     2        Y     X      Y      Z
TIME3     2002     2        Z     X      Y      Z

Thank you in advance.
Ramesh

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