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 on April 23, and its replacement, is already up and running.

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

st: Panel data variable transpose help

From   "Dangol, Ramesh" <>
To   "" <>
Subject   st: Panel data variable transpose help
Date   Tue, 3 Apr 2012 11:10:00 -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		

ITEM11       2003     2                  X                     X              Y             Z
ITEM12	      2003	    2	        Y	               X              Y             Z
TIME12       2003	    2	        Z	               X              Y             Z

Thank you in advance.

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index