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 #11530 is a reply to message #11517] Mon, 09 January 2017 08:51 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3039
Registered: February 2013
Senior Member
Following is a response from DHS Senior Research Associate, 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 will ask the Data Processing staff about the remaining discrepancy, but cannot give you any guarantee that this will be completely resolved. 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 25 01:32:46 Coordinated Universal Time 2024