*weight gen wt = v005/1000000 *create variable for birth in last two years gen birth2 = 0 if v208>0 replace birth2 =1 if v222<24 label var birth2 "Had a birth in the last two years" *generate general variable for if they had a check at all or not gen check =0 if birth2 ==1 replace check =1 if (m62_1 ==1 |m66_1==1) & birth2==1 *recode timing variable recode m51_1 ( 100/103 =1 "less than 4 hours") (104/123= 2 "4 to 23 hours") (200 = 3 "assume 4-23 hours ") (124/171 201/202 = 4 "1-2 days") (172/197 203/206 =5 "3-6 days new") (207/241 300/305 = 6 "7-41 days new") (242/299 306/899 = 0 "no check/past 41 days") (900/1000 =9 "dk") (else =99 "missing") if birth2==1 , gen (pnctime) *add back in women who said they did not have a check to keep denominator women with birth in 2 yr replace pnctime = 0 if check==0 & birth2==1 ta pnctime [iw=wt]