Linking parents to children [message #2591] |
Fri, 18 July 2014 11:51 |
nnalo
Messages: 5 Registered: July 2014
|
Member |
|
|
Hello,
I am working with DHS 2013, Nigeria data set. I am having trouble linking the parents education level with the children from the household member recode. How do I identify the parents that have children aged 5-15 years.
I have already generated a new variable for mother's age and father's age using the mother's line number and father's line number.
i.e
sort hhid hvidx
>
> Next, generate variables with the mother's and father's age.
>
> . by hhid: gen mage = hv105[hv112]
> . by hhid: gen fage = hv105[hv114]
Thank you.
|
|
|
|
|
Re: Linking parents to children [message #2634 is a reply to message #2595] |
Tue, 29 July 2014 00:51 |
smileyc
Messages: 14 Registered: June 2014
|
Member |
|
|
Hello, I almost have the same case but the I am more interested on parents of children 15-24 years of age. Is there a way I can generate the mother and father years of schooling using the IR, MR, PR, and KR DHS recodes?
Would appreciate your advice on this. Thank you
|
|
|
Re: Linking parents to children [message #2635 is a reply to message #2595] |
Tue, 29 July 2014 00:51 |
smileyc
Messages: 14 Registered: June 2014
|
Member |
|
|
Hello, I almost have the same case but I am more interested on parents of children 15-24 years of age. Is there a way I can generate the mother and father years of schooling using the IR, MR, PR, and KR DHS recodes?
Would appreciate your advice on this. Thank you
|
|
|
|
Re: Linking parents to children [message #2640 is a reply to message #2636] |
Tue, 29 July 2014 19:10 |
smileyc
Messages: 14 Registered: June 2014
|
Member |
|
|
Dear Bridgette,
Thank you for this useful information. I have seen the question on survivorship and residence of biological parents and yes you're right that the questions is being asked to children 0-17 years old only.
I thought I can use the women's (individual recode) to link the mother with their children recorded in the household member's recode. Same as for men. Can this be possible?
Thank you.
|
|
|
|
|
Re: Linking parents to children [message #12503 is a reply to message #12496] |
Tue, 30 May 2017 15:19 |
Bridgette-DHS
Messages: 3214 Registered: February 2013
|
Senior Member |
|
|
Following is a response from Senior DHS Stata Specialist, Tom Pullum:
Here are some lines for doing this merge. I used the Cambodia 2014 data files. You need to change the paths as well as the files. I have added in some variables (child_in_PR_file, etc.) that may help with the interpretation but are not really necessary. Good luck....
set more off
use e:\DHS\DHS_data\IR_files\KHIR72FL.dta, clear
sort v001 v002 v003
gen in_IR_file=1
save e:\DHS\DHS_data\scratch\temp.dta, replace
ta
use e:\DHS\DHS_data\PR_files\KHPR72FL.dta, clear
rename hv001 v001
rename hv002 v002
rename hv112 v003
tab v003,m
drop if v003==.
gen child_in_PR_file=1
gen mother_in_hh=1
replace mother_in_hh=0 if v003==0
sort v001 v002 v003
merge v001 v002 v003 using e:\DHS\DHS_data\scratch\temp.dta
tab1 v003 *_file mother* _merge,m
drop if _merge==2
tab _merge mother_in_hh,m
drop _merge
* This file has one record per child
* hv variables refer to the child, v variables refer to the mother
* If the child's mother is not in the household, then mother_in_hh=0
|
|
|