Imagin 3 players transmitting messages, we say a player transmits a message correctly if she copied the same message with her upstream player.
Now I have the data of all the copied messages and the sequence of players but I don't know how to create the new variable recording whether she copied the upstream message correctly.
i.e. whether the message she copied is the same as her upstream message.
Code:
input id entry1 entry2 entry3
1 123 456 789
2 789 123 456
3 456 789 123
endSomething like the following (which is not working "invalid syntax"):
Code:
bysort id: gen correct2=1 if id==2 & entry2[2]==entry1[1]
0 Response to Extract entries across rows?
Post a Comment