Hi there,
I have a dataset similar to the following:
I want to create a dataset where all columns except for ultimateid are stacked, and ultimateid is maintained - for example:
I know this will yield duplicates; I can de-dup later.
After digging around on Statalist, I saw some suggestions to use reshape and/or stack, but am not quite sure how to get those to work in this particular case.
Thank you in advance for any advice or suggestions.
Erika
I have a dataset similar to the following:
Code:
clear input int parentid int id int childid int ultimateid 1 4 8 0 1 4 6 1 2 9 . 2 end
Code:
clear input int newid int ultimateid 1 1 1 1 2 2 4 1 4 1 9 2 8 1 6 1 . 2 end
After digging around on Statalist, I saw some suggestions to use reshape and/or stack, but am not quite sure how to get those to work in this particular case.
Thank you in advance for any advice or suggestions.
Erika
Comment