Hi everyone,
I need to manage some data that is in the following long form:
id NAME VARIABLES_CODE DATA YEAR
1241 A WC02999 394500 1990
1241 A WC03351 264100 1990
1241 A WC03255 78600 1990
1638 B WC02999 232700 1990
1638 B WC03351 79400 1990
1638 B WC03255 0 1990
1917 C WC02999 44595 1991
1917 C WC03351 28399 1991
1917 C WC03255 17506 1991
1241 A WC02999 394500 1991
1241 A WC03351 264100 1991
1241 A WC03255 78600 1991
I need to put it in the following form:
id NAME WC02999 WC03351 WC03255 YEAR
1241 A 394500 264100 7860 1990
1638 B 232700 79400 0 1990
1917 C 44595 28399 17506 1991
1241 A 394500 264100 7860 1991
Does anyone know a way of doing this? I've tried the reshape function but
can't put it this way... I' also tried to break the file into several files
according to the year of each observation but the problem persists...
Thanks for any help!
Cheers,
Nuno
*
* 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/