Dear all,

I have data on education attainment per year and state and I want to compute the percentage of people who are 25 or above and have at least a Bachelors degree in a given state a given year. So far I have tried the following:

Code:
gen percedu = 0
replace percedu = 1 if educ>=110
egen meanpercedu = wtmean(percedu) if age>=25, weight(asecwt) by (statefip year)
The issue is that for all observations in a given state and given year whose age is less than 25, I have a missing value. What I want is to have the same value instead of missing values for all. Is there a way to compute this?

Thank you in advance.

Best regards,
Alexandros Achilleos