Dear all,

I am working with a panel data set, and would like to create a new variable which measures the 'age as first-time parent'. I generated a new variable:

PHP Code:
gen age_firstborn AGE if year == year_firstborn 
However I get missing values on all other years for each id.

How can I fill the age in for each id for all years?

Best,
Kamilla