The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » General Data Questions » Education variable (PR file) (Education of head of household)
Education variable (PR file) [message #18004] Wed, 14 August 2019 03:32 Go to next message
Nyamwiza is currently offline  Nyamwiza
Messages: 3
Registered: August 2019
Member
Good evening Admin,

I am a student at the University of Nottingham working on a research project looking at the prevalence of the risk factors for COPD in Nepal. My outcome measures are;
Type of cooking fuel biomass- yes or no (Created from hv226)
A new variable exposure to biomass smoke in the home was created if cooking took place in the house and biomass==1 Tab hv241 if solid==1
Exposure to tobacco smoke in the home hv252

My supervisors didn't seem to agree on whether to use the HR file or the PR file. I for one had used the PR file as I was looking at the household members exposed to the above markers of HAP.
My independent variables in this analysis include hv271(I used household wealth so that individuals from the same household get to be in the same quintile), hv104, hv105, shecoreg, hv025, hv024, and hv105.

My question is on hv105. How do I get the education level of the household head- I am trying to find out how education level of the household head affects the odds of exposure to household air pollution. I tried to use one of the ideas on the forum but got a bit confused.
Using the PR file, I did the following:
gen headed = hv106 if 101==1 (headed being the education level of the household head). This generated 11,040 which is expected.
But how do I assign this score to the different household members so that people in the same household are assigned to the same household head's education level. I hope my question makes sense.

Thanks in advance,
Re: Education variable (PR file) [message #18040 is a reply to message #18004] Fri, 23 August 2019 14:27 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3035
Registered: February 2013
Senior Member

Following is a response from DHS Research and Data Analysis Director, Tom Pullum:

I think there is a way to do this in Stata with one of the "egen" commands, but the following is very fast. You will have to change the paths. Let us know if this doesn't work!

* Open and save PR file
use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\TZPR7AFL.DTA" , clear
save e:\DHS\DHS_data\scratch\TZPR_temp1.dta, replace

* Construct and save a file reduced to the household head
keep if hv101==1
keep hhid hv106
rename hv106 hv106_head
sort hhid
save e:\DHS\DHS_data\scratch\TZPR_temp2.dta, replace

* Re-open the PR file and merge with the head's information
use e:\DHS\DHS_data\scratch\TZPR_temp1.dta, clear
sort hhid hvidx
merge hhid using e:\DHS\DHS_data\scratch\TZPR_temp2.dta

drop _merge

* Check 
list hhid hvidx hv106 hv106_head if _n<=50, table clean
Previous Topic: Education variable inconsistent
Next Topic: Sampling weights harmonization between DHS and MICS
Goto Forum:
  


Current Time: Sat Apr 20 01:52:33 Coordinated Universal Time 2024