Dear all, My data is
where `Code' denotes times, and there are three firms (ITL, PCL, and ABC; in fact, there are hundreds of firms) and two variables (MV and WC05476; in fact, there are 9 variables) so that there are 6 (2x3) variables. How can I reshape the data into a long form.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int Code double(ITLMV ITLWC05476) long PCLMV double(PCLWC05476 ABCMV ABCWC05476) 17145 971223.8 1.37 . 3.277 . . 17176 1427975 1.581 . 4.007 . -2.24 17207 1202109 1.581 . 4.007 . -2.24 17235 1267359 1.581 . 4.007 . -2.24 17266 1400369 1.581 . 4.007 . -2.24 17296 1448051 1.581 . 4.007 . -2.24 17327 1259830 1.581 . 4.007 . -2.24 17357 1345157 1.581 . 4.007 . -2.24 17388 1678937 1.581 . 4.007 . -2.24 17419 1706543 1.581 . 4.007 . -2.24 17449 1904803 1.581 . 4.007 . -2.24 17480 2095535 1.581 6182182 4.007 . -2.24 17510 2088006 1.581 5087589 4.007 . -2.24 17541 2040323 1.77 4948336 4.321 . .894 17572 1779322 1.77 4001092 4.321 . .894 17601 1548436 1.77 3562284 4.321 . .894 17632 1550946 1.77 2809345 4.321 . .894 17662 1540907 1.77 2900021 4.321 . .894 17693 1350176 1.77 2611800 4.321 . .894 17723 1277397 1.77 2483883 4.321 . .894 17754 1254811 1.77 2365680 4.321 . .894 17785 1131839 1.77 1794095 4.321 . .894 17815 1003849 1.77 1968971 4.321 . .894 17846 1001340 1.77 1816764 4.321 . .894 17876 1023926 1.77 1876675 4.321 . .894 17907 898444.8 1.979 1653223 4.629 . 1.055 17938 988791.4 1.979 1922014 4.629 . 1.055 17966 933579.3 1.979 1747138 4.629 . 1.055 end format %tdnn/dd/CCYY Code
Comment