I have a panel dataset of firms over time that I am attempting to convert from ‘long’ to ‘wide’ (perhaps these terms are incorrect and I apologise if so but the code below should convey the idea).
The data has multiple observations of the same firm per year with fiscal information at every year (giving over 4 million observations). I would like to transform this into a single observation of one firm with a new variable for fiscal information at every year (hope this makes sense!).
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float firmid str4 closingyear double fixedassets 1092 "1989" 60274810 1092 "1990" 77463935 87397 "1990" 40294909 1092 "1991" 66114814 25177 "1991" 991958993 87397 "1991" 43335100 end
I would appreciate any and all advice on this issue – do let me know if I have missed some important piece of information.
Thank you for your help and time!
Ana
0 Response to Problem generating panel data set from ‘long’ data
Post a Comment