The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Maternal Education in Child Recode File
Re: Maternal Education in Child Recode File [message #4011 is a reply to message #3982] Tue, 17 March 2015 10:42 Go to previous messageGo to previous message
Liz-DHS
Messages: 1516
Registered: February 2013
Senior Member
Dear User,
Here is a response from one of our subject experts, Dr. Tom Pullum:
Quote:
The cases in the KR file are children born in the past five years and the v variables describe their mothers. A woman in the IR file will only appear in the KR data if she had a child in the past five years, and she will appear more than once if she had more than one child. The v variables in the KR file are the same as the v variables in the IR file--that is, they refer to the women age 15-49 who interviewed about their fertility, etc. For example, v003, "respondent's line number" is the mother's line number (in the household survey) and v012, "respondent's current age", is the mother's current age.
There is definitely room for confusion, because in the PR file, in which every person in every household is a case, hv003 is the line number of the person who provided the household information. That will be the same person and line for everyone in the household. That's the "household respondent." This is not necessarily the household head. The household is the person with hv101=1. Usually that's the person on line 1, but not always. In the PR file, each person's line number is called hvidx.
There are various ways to link the files. For example, in the KR file, the line number of the child in the PR file is b16. However, if you are using the IR or KR file and want the line number of the household respondent--I think that's what you are asking about--it's a little more complicated. You have to do a merge.
Here are the lines that you would use to merge the data for the household head or the household respondent to the data in the KR (or IR) file. Let me know if you have any questions.

* LINES TO ATTACH DATA FROM THE HOUSEHOLD HEAD TO THE KR (OR IR) DATA
* open the PR file
* save record for the household head
keep if hv101==1
* keep the PR variables you want
rename hv001 v001
rename hv002 v002
sort v001 v002
save temp.dta, replace
* open the KR (or IR) file
sort v001 v002
merge v001 v002 using temp.dta, replace 
keep if _merge==3

* LINES TO ATTACH DATA FROM THE HOUSEHOLD RESPONDENT TO THE KR (OR IR) DATA
* open the PR file
* save record for the household respondent
keep if hvidx==hv003
* keep the PR variables you want
rename hv001 v001
rename hv002 v002
sort v001 v002
save temp.dta, replace
* open the KR (or IR) file
sort v001 v002
merge v001 v002 using temp.dta, replace 
keep if _merge==3

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: NUMBER OF CHILDREN UNDER-FIVE
Next Topic: Child Health Indicators in Eastern African Countries
Goto Forum:
  


Current Time: Fri Dec 6 11:35:54 Coordinated Universal Time 2024