*cd [specify preferred folder path here] *use [integrated cross-sectional dataset here], clear label define countries 1 "Burkina Faso" 2 "DRC" 7 "Kenya" 9 "Nigeria" label values country countries preserve keep if mcp<2 collapse mcp, by(country phase age) twoway (line mcp age if phase==1) (line mcp age if phase==2) (line mcp age if phase==3), by(country, title("Proportion of Women Using Modern" "Contraceptives by Age, Country and Phase") note("")) legend(subtitle("Phase") order(1 "1" 2 "2" 3 "3")) ytitle("Proportion Using Modern Contraceptives") xtitle("Age") graph export mcp-age-cs.pdf, replace restore preserve keep if fertpref<=2 replace fertpref=0 if fertpref==2 collapse fertpref, by(country phase age) twoway (line fertpref age if phase==1) (line fertpref age if phase==2) (line fertpref age if phase==3), by(country, title("Proportion of Women Wanting Another Child" "by Age, Country and Phase") note("")) legend(subtitle("Phase") order(1 "1" 2 "2" 3 "3")) ytitle("Proportion Wanting Another Child") xtitle("Age") graph export fertpref-age-cs.pdf, replace restore