Stata community is requested to please help me.
I have this data set
Person | Number of toffees Person has |
Person's Friend | |
Jack | 2 | Ace | |
Ace | 5 | Jack | |
Roger | 9 | . | |
Daniel | 5 | . | |
Sandy | 7 | Kale | |
Kale | 17 | Sandy | |
Rogan | 11 | . | |
Brian | 13 | Alex | |
Alex | 1 | Brian | |
Timmon | 25 | . |
I require the data set to be this form.
Person | Number of toffees Person has |
Person's Friend | Number of toffees Person's Friend has |
Jack | 2 | Ace | 5 |
Ace | 5 | Jack | 2 |
Roger | 9 | . | |
Daniel | 5 | . | |
Sandy | 7 | Kale | 17 |
Kale | 17 | Sandy | 7 |
Rogan | 11 | . | |
Brian | 13 | Alex | 1 |
Alex | 1 | Brian | 13 |
Timmon | 25 | . |
I would appreciate your suggestions to solve this hurdle.
Comment