Dear all,

I am a bit stuck. I have household and personal id date for 8 rounds, however not each person is recorded in every round. I would like to recode a variable and replace its value with the value of the round before. My data looks the following:


ID HHID Round Y
1 1 1 1
2 1 1 0
3 1 1 2
3 1 2 .

How can I replace the missing value for Y for ID 3 in round 2 with the value of 2 for y from round 1 ?

Thank you very much!