Home » Topics » HIV » number not matched in "Pregnant women counseled and tested for HIV"
number not matched in "Pregnant women counseled and tested for HIV" [message #14279] |
Sat, 17 March 2018 10:04 |
Nicholus Tint Zaw
Messages: 13 Registered: March 2018 Location: Myanmar
|
Member |
|
|
Hi,
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.
[clear
use "${pr_person}", clear
gen v001 = hv001
gen v002 = hv002
gen in_pr = 1
sort v001 v002
br v001 hv001 v002 hv002
tempfile last_2yr_birth
save `last_2yr_birth', replace
clear
** (B) : Merge with Women IR dataset **
use "${ir_women}", clear
gen in_ir = 1
sort v001 v002
merge m:m v001 v002 using `last_2yr_birth'
tab1 _merge in_ir in_pr
keep if _merge == 3
** (A) : Keep only de facto **
tab hv103, m // should be 1
keep if hv103 == 1
** (B) : Child Date of Birth Var Construction **
tab hc32 // date of birth variable in CMC format
/* Note from DHS Re-code Manual
Century Month Code, look at manual page 11 for detail
*/
tab hc16 // day
tab hc16, nolab
replace hc16 = .n if hc16 >= 98 & !mi(hc16)
tab hc30 // month
tab hc31 // yrs
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
lookfor sampling // search for samping unit var
svyset, clear
svyset [pw = wgt], psu(v021) strata (v022)
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
svyset, clear][/code]
Best regards,
Nicholus
nicholus
|
|
|
Goto Forum:
Current Time: Wed Dec 4 21:29:13 Coordinated Universal Time 2024
|