The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » urban/rural variable with education data in dhs in stata
urban/rural variable with education data in dhs in stata [message #13303] Mon, 16 October 2017 08:19 Go to next message
jrg20 is currently offline  jrg20
Messages: 4
Registered: October 2017
Location: South Africa
Member
Hello,

I am using the PR File of DHS 2010 Malawi. and want to first attempt to replicate Table 2.4 (net attendance ratio) before progressing to do the analysis I am actually looking to do just to ensure I am doing the right thing. I was wondering if you could help me with the urban/rural variable you used to do that? Unless i have not searched correctly, I am unable to find it in the PR file. And when I do find it in another file such as the MR file, i am not sure if that is the correct one to use as to my understanding that would just represent all eligible men and not a fuller sample like i have with the PR file.

Thanks.
Re: urban/rural variable with education data in dhs in stata [message #13304 is a reply to message #13303] Mon, 16 October 2017 09:30 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3013
Registered: February 2013
Senior Member
A response from Senior DHS Stata Specialist, Tom Pullum:

Urban/rural residence is given by hv025 in the HR and PR files, v025 in the IR, BR, KR, and CR files, and mv025 in the MR file.
Re: urban/rural variable with education data in dhs in stata [message #13305 is a reply to message #13304] Mon, 16 October 2017 09:38 Go to previous message
jrg20 is currently offline  jrg20
Messages: 4
Registered: October 2017
Location: South Africa
Member
Thank you so much for your prompt response. I found it, but have been unable to replicate the results found in the table in the DHS still. Find my (stata) code below:

gen weight=hv005/1000000
svyset [pw=weight], psu(hv021) strata(hv022)

svy:tab hv122 if inrange(hv105,6,13) & hv025==1 & hv104==1 & hv103==1 /// range given in the notes in DHS Final report Table 2.4 where hv103==1 is defacto, hv025==1 is urban, and hv104==1 is male.

output is giving me attended ==92.76% instead of 96.3 as given in the DHS Report.
May you kindly tell me where I am getting this wrong?

Thank you.
Previous Topic: MERGING INDIVIDUAL RECORD WITH MEN'S RECORD
Next Topic: Merging individual record to couples record
Goto Forum:
  


Current Time: Tue Mar 19 04:03:38 Coordinated Universal Time 2024