I’m stuck on a problem regarding generation of a new variable.
My original dataset looks like this.
Offer ID | Points | Accept ID |
3456 | 2 | |
6789 | 6 | 3456 |
5678 | 6 | |
8760 | 3 | 5678 |
5672 | 4 | 6789 |
I’d like to generate a new variable “Acceptor Points” which assigns the Points for the Acceptor IDs. The Acceptor Points is taken from the Points column with respect to the Acceptor IDs.
Ideally my dataset should look like this.
Offer ID | Points | Accept ID | Acceptor Points |
3456 | 2 | ||
6789 | 6 | 3456 | 2 |
5678 | 6 | ||
8760 | 3 | 5678 | 6 |
5672 | 4 | 6789 | 6 |
0 Response to Advanced generation of a new variable
Post a Comment