Linking Roster Items across Rounds in the NLSY97

STATA Code

gen position2 =0;
replace position2 =1 if R1uid2 = = R2uid1;
replace position2 =2 if R1uid2 = = R2uid2;
replace position2 =3 if R1uid2 = = R2uid3;
replace position2 =4 if R1uid2 = = R2uid4;
replace position2 =5 if R1uid2 = = R2uid5;
replace position2 =6 if R1uid2 = = R2uid6;
replace position2 =7 if R1uid2 = = R2uid7;
replace position2 =8 if R1uid2 = = R2uid8;
replace position2 =9 if R1uid2 = = R2uid9;
replace position2 =10 if R1uid2 = = R2uid10;
replace position2 =11 if R1uid2 = = R2uid11;
replace position2 =12 if R1uid2 = = R2uid12;
replace position2 =13 if R1uid2 = = R2uid13;
replace position2 =14 if R1uid2 = = R2uid14;