Good morning,
I ask you for help because I need to complete a database.
For that I have to change from this format:
To this one:
That is, for each ID, have a line for the 5 different "list", and if the "list" was not in the initial database then put 0 in the variable x
Thanks a lot
I ask you for help because I need to complete a database.
For that I have to change from this format:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(ID list x) 1 1 10 1 2 15 1 4 10 2 1 14 2 5 15 3 2 16 3 3 12 end
To this one:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(ID list x) 1 1 10 1 2 15 1 3 0 1 4 10 1 5 0 2 1 14 2 2 0 2 3 0 2 4 0 2 5 15 3 1 0 3 2 16 3 3 12 3 4 1 3 5 0 end
That is, for each ID, have a line for the 5 different "list", and if the "list" was not in the initial database then put 0 in the variable x
Thanks a lot

Comment