Kenya 2014 Table 13.19 [message #11517] |
Fri, 06 January 2017 04:58 ![Go to next message Go to next message](/theme/default/images/down.png) |
cmergenthaler
Messages: 7 Registered: July 2016 Location: Netherlands
|
Member |
|
|
Dear DHS experts,
I am trying to match a value presented in Kenya's 2014 final DHS report table 13.19, specifically the % of women 15 19 and 20 24 who used a condom at last sexual intercourse (also unmarried and had sex within past 12 months). My Stata syntax yields weighted proportions which are slightly off from those which are presented.
tab v761 if (v529 >=0 | v529 <= 12) & v535 == 0 & v013 == 1 [iweight = v005/1000000]
condom used |
during last |
sex with |
most recent |
partner | Freq. Percent Cum.
------------+-----------------------------------
no | 177.935511 44.03 44.03
yes | 226.186149 55.97 100.00
------------+-----------------------------------
Total | 404.12166 100.00
55.97 should be 55.6 according to the table.
tab v761 if (v529 >=0 | v529 <= 12) & v535 == 0 & v013 == 2 [iweight = v005/1000000]
condom used |
during last |
sex with |
most recent |
partner | Freq. Percent Cum.
------------+-----------------------------------
no | 171.948023 34.77 34.77
yes | 322.565111 65.23 100.00
------------+-----------------------------------
Total | 494.513134 100.00
65.23 should be 64.8 according to the table.
I'm appreciative for your support, as I'm unsure why I'm not able to match these proportions exactly!
Kind regards,
Christina Mergenthaler
|
|
|
|
Re: Kenya 2014 Table 13.19 [message #11682 is a reply to message #11530] |
Fri, 27 January 2017 07:06 ![Go to previous message Go to previous message](/theme/default/images/up.png) |
Bridgette-DHS
Messages: 3152 Registered: February 2013
|
Senior Member |
|
|
Here's a follow up response from Tom Pullum:
A couple of people here at DHS have tried to get an exact match using Stata and still get a discrepancy of about 0.1% An SPSS translation of the original CSPro program DOES give a match. There may be one or two cases with illegal codes that are being handled in different ways by CSPro and SPSS. We cannot spend more time trying to uncover the source of the discrepancy. Sorry about that. Fortunately, the discrepancy is very small and would not affect any interpretations. Here are comments from two DHS experts.
First, from Ladys Ortiz Parra:
I ran table 13.19 in SPSS and got the same number as in the report. The only problem that I can see is that there are 5 cases in the dominator that are not applicable in v761 = use of condom during last sex. This is because there are 3 cases of women that have sex last 12 months (v527 ) and V761 is missing. There are 2 more cases where v527 = 400 that were classified as sex in the last 12 months but V761 = NA. In the report those 5 cases are included in the denominator. I think the user is excluding those 5 cases and that is why her numbers are higher.
Next, from Shireen Assaf:
We tried to match the table but are still off by 0.1% and 2 cases for the condom use estimate. However, we matched the estimate and denominator for sex in the last 12 months. To match the denominator for sex in the last 12 months you must merge with the PR file. For these questions the long questionnaire was used. We recommend that you proceed with just the modifications given here.
use KEPR70FL.dta, clear
*** Renaming the unique identifiers****
rename hv001 v001
rename hv002 v002
rename hvidx v003
***sorting the variables*******
sort v001 v002 v003
keep v001 v002 v003 hv027
save temp.dta, replace
use KEIR70FL.dta, clear
sort v001 v002 v003
merge v001 v002 v003 using temp.dta
tab _merge
keep if _merge==3
****selected for men's questionnaire / long questionnaire
keep if hv027 == 1
gen wt= v005/1000000
gen sex12m=0
replace sex12m=1 if v527>=100 & v527<=311
label define yesno 0 No 1 Yes
label values sex12m yesno
label var sex12m "sex in the last 12 months"
ta sex12m if v501==0 & v013<3 [iw=wt]
* matches percentage of those who had sex in the last 12 months.
ta sex12m v013 if v501==0 & v013<3 [iw=wt], col
gen conduse=0 if sex12m==1 & v501==0 & v013<3
replace conduse=1 if v761==1 & v501==0 & v013<3
* off by 0.1 % and 2 cases
ta conduse v013 [iw=wt], col
|
|
|