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: Panel Data Variable Transpose


From   "Dangol, Ramesh" <[email protected]>
To   "[email protected]" <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index