Zambia: Mother and Father Education and source of water [message #15568] |
Mon, 13 August 2018 10:00 |
Tina Berti
Messages: 1 Registered: August 2018 Location: Zambia
|
Member |
|
|
Hello,
I am trying to determine how a parents education (mother in one instance and father in another) affects a child's nutrition(children 0- 59months). I am also using source of drinking water as a control variable. I am using the PR file - Household member record for the 2007 and 2013-14 dataset, but I am having trouble calculating these figures. Could you please help me with the commands to calculate mother, father education and source of drinking water in STATA. I have managed to calculate for child nutrition in 3 ways.
Thank you so much for your help
Thanks,
Tina
|
|
|
|
Re: Zambia: Mother and Father Education and source of water [message #15780 is a reply to message #15568] |
Fri, 14 September 2018 16:32 |
Bridgette-DHS
Messages: 3199 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Specialist, Tom Pullum:
The following lines show how to merge the characteristics of the mother and father onto the record for the child using hv112 and hv114, the line numbers of the parents (if they are living and in the same household as the child). You need to save working files in some location. I use "scratch" folders and "temp" files. The file called "tempchild.dta" is the file you want. Source of drinking water is hv201. Every record in the PR file has hv201 on it, so it's in tempchild.dta.
set more off
cd e:\DHS\DHS_data\scratch
use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\ZMPR61FL.DTA" , clear
save tempall.dta, replace
* construct a file of potential mothers
use tempall.dta, clear
keep if hv104==2
keep hv001 hv002 hvidx hv106
rename hv106 mother_ed
rename hvidx mo_line
sort hv001 hv002 mo_line
save tempmo.dta, replace
* construct a file of potential fathers
use tempall.dta, clear
keep if hv104==1
keep hv001 hv002 hvidx hv106
rename hv106 father_ed
rename hvidx fa_line
sort hv001 hv002 fa_line
save tempfa.dta, replace
* prepare children for merge with mothers
use tempall.dta, clear
keep if hc1<.
rename hv112 mo_line
sort hv001 hv002 mo_line
merge hv001 hv002 mo_line using tempmo.dta
rename _merge mo_merge
rename hv114 fa_line
sort hv001 hv002 fa_line
merge hv001 hv002 fa_line using tempfa.dta
rename _merge fa_merge
drop if mo_line==. | fa_line==.
tab *_merge
drop *_merge
save tempchild.dta, replace
tab1 *_line
tab *_ed,m
|
|
|