The DHS Program User Forum - RDF feed
https://userforum.dhsprogram.com/index.php
number not matched in "Pregnant women counseled and tested for HIV"
https://userforum.dhsprogram.com/index.phpindex.php?t=rview&goto=14338&th=6882#msg_14338
I am now working on the Myanmar DHS data to make some in-depth analysis on pregnant mothers receiving HIV pre-test counselling.
Because of my country datasets didn't has separate hiv dataset, I look for those hiv related var for pregnant mother in mother (ir) dataset.
The DHS report using the number of mothers who gave birth in last two years as denominator for this session: "Pregnant women counseled and tested for HIV". But, in the ir dataset, I only found "mothers who gave birth in last 5 years or 3 years". So, did not matched with what DHS report.
Therefore, I used the pr file to get the numbers of children who was born in last two years (<= 23 months from interview date) and then, merge with ir file to calculated the hiv related indicators. However, the number of denominator and results (%) were not identical with DHS report even I applied the weighted analysis at women dataset level. Below were my stata code for reference. And, is there anyone who can check my issue and provide comments how to solve it? Thanks in advance.
gen cdob = mdy(hc30, hc16, hc31)
format cdob %td
replace cdob = .n if mi(hc30) & mi(hc16) & mi(hc31)
replace cdob = .n if hc30 > 31 & !mi(hc30)
br hc16 hc30 hc31 cdob
** (C) : Interview Date Var Construction **
tab hv006 // month
tab hv016 // day
tab hv007 // year
gen interview_date = mdy(hv006, hv016, hv007)
format interview_date %td
replace interview_date = .n if mi(hv006) & mi(hv016) & mi(hv007)
//replace interview_date = .n if hv016 < 31 & !mi(hv016)
br hv006 hv016 hv007 interview_date
** (D) : Keep Only Obs Who were born in last two years **
// period between child DOB and Date of interview by months
gen last_yr_count = round((interview_date - cdob)/30.4375, 0.1)
tab last_yr_count, m
gen is_last_2yr = (last_yr_count <= 23)
replace is_last_2yr = .n if mi(last_yr_count)
tab is_last_2yr, m
keep if is_last_2yr == 1
tab v209, nolab // birth in past year
//keep if v209 != 0
** Duplicate Check **
duplicates report hhid
duplicates tag hhid, gen (dup_hhid)
tab dup_hhid, m
sort hv001 hv002
br if dup_hhid == 2 // identical DOB cases, seem triplet
br if dup_hhid == 1 // mix both duplicate hhid with DOB identical and different cases
duplicates tag hhid cdob, gen (dup_hhid_cdob)
tab dup_hhid_cdob, m
br if dup_hhid_cdob == 1 // out of 144 dup hhid two times, only 32 had identical DOB
//duplicates drop hhid cdob, force
** (D) : Keep Only Obs Who were born in last two years **
** Construct WEIGHT var using Women Insidividual Sample Weight **
gen wgt = v005/1000000
tab wgt, m
svy: tab is_last_2yr
// Population size = 1,680.6382, DHS report on # of weomen who gave birth in last 2 yrs - 1,669
// variance - 11 obs - seems this come from twin cases
svy: tab v839
svy: tab v840