Hi,
In my dataset of executives I have age values (AGE) for the executives (EXECID) but not for every year (Year). Therefore, I want to fill in the age of the executives in the missing years based on the years I do know from them. I have added a screenshot of my browser to make it clear. EXECID is the ID for an executive. In the screenshot you can see that for the EXECID the previous year(s) are missing. I want Stata to fill in those based on the other age values of the same EXECID.
Which command will let Stata know to fill in the age of the executive of the previous year with the missing value?
And which command will let Stata know to fill in the age of the executive of the next year with a missing value?
Thanks in advance.
In my dataset of executives I have age values (AGE) for the executives (EXECID) but not for every year (Year). Therefore, I want to fill in the age of the executives in the missing years based on the years I do know from them. I have added a screenshot of my browser to make it clear. EXECID is the ID for an executive. In the screenshot you can see that for the EXECID the previous year(s) are missing. I want Stata to fill in those based on the other age values of the same EXECID.
Which command will let Stata know to fill in the age of the executive of the previous year with the missing value?
And which command will let Stata know to fill in the age of the executive of the next year with a missing value?
Thanks in advance.
Comment