The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Kenya » Kenya 2014 Table 13.19
Re: Kenya 2014 Table 13.19 [message #11682 is a reply to message #11530] Fri, 27 January 2017 07:06 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3032
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
 
Read Message
Read Message
Read Message
Previous Topic: Merging Datasets
Next Topic: Help regarding the variable
Goto Forum:
  


Current Time: Thu Apr 18 03:51:30 Coordinated Universal Time 2024