* do e:\DHS\programs\postnatal_care\NFHS2_table_8pt11_postnatal_24Aug2023.txt * Table 8.11, time to post-partum care, in NFHS-2 (India 1998-99) ********************************************************************************** program define prepare_data lookfor post * s305aj byte %8.0g s305aj received postpartum care lookfor time * s430n byte %8.0g time after birth had first routine checkup (number) describe s305* s430* gen wt=v005/1000000 * restrict to the two most recent births within months 2-35 * Note: hw1 is only defined for living children; must include those who died gen msb=v008-b3 label variable msb "Months since birth" tab bidx * Note: No need to restrict to bidx<=2; in the KR file, bidx only equals 1 or 2 * Get better match with msb>=1 rather than msb>=2, which would have seemed to be correct keep if bidx<=2 & msb>=1 & msb<=35 * The table is limited to "noninstitutional" births, i.e. births at home * Look at table 8.9 to clarify the definition; includes "Other". Also include m15=. label list m15 tab m15 [iweight=wt],m keep if m15<20 | m15==96 | m15==. tab m15 [iweight=wt],m * close although not an exact match tab s430n s430u gen two_months=0 replace two_months=100 if (s430u==1 & s430n<=60) | (s430u==2 & s430n<=8) gen one_week=0 if two_months==100 replace one_week=100 if (s430u==1 & s430n<=6) | (s430u==2 & s430n==0) gen two_days=0 if two_months==100 replace two_days=100 if (s430u==1 & s430n<2) tab two_months [iweight=wt] tab one_week [iweight=wt] tab two_days [iweight=wt] gen abdom_exam=0 if s432a<=1 replace abdom_exam=100 if s432a==1 gen fp_advice=0 if s432b<=1 replace fp_advice=100 if s432b==1 gen bf_advice=0 if s432c<=1 replace bf_advice=100 if s432c==1 gen bc_advice=0 if s432d<=1 replace bc_advice=100 if s432d==1 * Mother's age at birth gen mo_age=int((b3-v011)/12) gen mo_age_cats=1 replace mo_age_cats=2 if mo_age>=20 replace mo_age_cats=3 if mo_age>=35 label variable mo_age_cats "Mother's age at birth" label define ma 1 "<20" 2 "20-34" 3 "35-49" label values mo_age_cats ma * Birth order gen bord_cats=1 replace bord_cats=2 if bord>=2 replace bord_cats=3 if bord>=4 replace bord_cats=4 if bord>=6 label variable bord_cats "Birth order" label define bord_cats 1 "1" 2 "2-3" 3 "4-5" 4 "6+" label values bord_cats bord_dats * Number of antenatal visits gen anc_cats=m14 if m14<98 replace anc_cats=3 if m14>3 & m14<98 label define anc 0 "0" 1 "1" 2 "2" 3 "3+" label values anc_cats anc end ********************************************************************************** program define make_table local lcovars mo_age_cats bord_cats v025 v106 v130 v131 ssli anc_cats foreach lc of local lcovars { tabstat two_months two_days one_week abdom_exam fp_advice bf_advice bc_advice [fweight=v005], statistics(mean) format(%6.1f) by(`lc') * In the following tables, the "Total" column is the "Number of births" and the column for two_months=100 * is the "Number of births followed by a postpartum checkup (within two months)" tab `lc' two_months } end ********************************************************************************** ********************************************************************************** ********************************************************************************** ********************************************************************************** ********************************************************************************** * Execution begins here use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\IAKR42FL.DTA", clear prepare_data make_table