Merging children, mother, and father's characteristics [message #27422] |
Thu, 10 August 2023 20:53 |
fraeus
Messages: 14 Registered: February 2023
|
Member |
|
|
Hi, I am working on Rwanda DHS VII. I need to do an analasys where my dependent variables will be children's nutritional outcomes, but keeping the information for their mothers, fathers and households. Also, I need that the unit of analysis remains the household, so to be able to calculate in my final dataset key variables, for instance mortality rates etc.
is this possible?
thank you
best,
Francesca
|
|
|
Re: Merging children, mother, and father's characteristics [message #27455 is a reply to message #27422] |
Tue, 15 August 2023 16:09 |
Bridgette-DHS
Messages: 3188 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS staff member, Tom Pullum:
It sounds like your unit of analysis is children, not households. I recommend that you use the KR (child) file. Each child's record includes almost all of the variables for the mother: all of the "v" variables in the KR file pertain to the mother. For household-level variables that you also want to attach to the child's record, use the Stata lines that I will paste below. Attaching the father's data is more difficult. If the father is in the household, his line number is given by hv114 on the child's record in the PR file. It's a complex merge and you lose the children whose father is not in the household. The steps are described in other posts.
* Stata program to copy household-level variables into the KR file
* Specify workspace
cd e:\DHS\DHS_data\scratch
* Prepare household data
use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\RWHR81FL.DTA" , clear
drop *_*
rename hv001 cluster
rename hv002 hh
sort cluster hh
save NGHR81_temp.dta, replace
* Prepare the KR file and merge
use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\RWKR81FL.DTA" , clear
rename v001 cluster
rename v002 hh
sort cluster hh
merge m:1 cluster hh using NGHR81_temp.dta
keep if _merge==3
drop _merge
|
|
|