Hi again. I have a new problem, and I'll try to explain it the best can.

First, som background info. I am studying retirement age, through a longitudinal study collected in three rounds. The participants had a reference number (ref_nr), which also told me how many rounds they participated in. I wanted to know the participants retirement age, and therefore generated a new variable retirementage, based on the variables I had; participants year of retirement, year the interview was held, participants age at time of interview. I subtracted the participants age at the time of the interview from the year of the interview, which gave med the birth year of the participants. After this I could subtract their year of birth from year of retirement, and create my new variable retirementage. All of this went fine, I thought...

Some of the participants ended up with two different retirement ages, with one year apart, in my new variable retirementage. This is because the interviews in the three rounds not necessarily were done at the same time of the year. For example if a participant with birthday in April was interviewed in Feburary in 2002, at age 50, and then interviewed again in June in 2007, he/she would have turned 56 (and not 55), because of the time of the interviews. As you may understand, because of the calculations, this gave me different years of birth, and therefor different retirementage.

So all in all, IF the same reference number (ref_nr), i.e. the same candidate, have two values on retirementage, I want to replace one of the values on retirementage with ".", because this is giving me non-existing values of retirementage. Alternatively get the average age of the two, but I still want it to be represented only once for each participant.

OR

If any of you have suggestions on other ways to calculate retirement age based on the variables i have, that accounts for birth month somehow, so that I avoid this discrepancy.

I hope this was somewhat understandable, at that someone can help me!!

Thanks, in advance.