clear all set memory 200M global year =2011 global communeid = 0 cd e:\chililabdata do genWomenBirths cd e:\chililabdata do genWomenInYear save WomenInYear, replace cd e:\chililabdata\data\birth use d:\chililabdata\data\cross\womeninyear merge agegrp using womenbirthyear drop if _merge == 2 drop _merge gen asfr = births/women save asfr$year, replace