The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » General » Members of households with foster and/or orphan children (Creating subdatasets for females aged 15-19 who live (not live) in households with foster and/or orphan children )
Members of households with foster and/or orphan children [message #17675] Mon, 06 May 2019 06:42
Mercysh is currently offline  Mercysh
Messages: 27
Registered: April 2014
Member
I am trying to create two sub-datasets for females aged 15-19 - 1) who live, and 2) who do not live in households with foster and/or orphan children in South Africa (SA DHS 2016 - related to Table 2.10). I have used the following code for Table 2.11 using the PR file - found on this forum:

*Orphan or not
gen orphan_type=.
replace orphan_type=1 if hv111==1 & hv113==1
replace orphan_type=2 if hv111==1 & hv113==0
replace orphan_type=3 if hv111==0 & hv113==1
replace orphan_type=4 if hv111==0 & hv113==0
replace orphan_type=5 if (hv111>1 & hv111<.) | (hv113>1 & hv113<.)

label define orphan_type 1 "Both parents alive" 2 "Mother alive, father dead" 3 "Father alive, mother dead" 4 "Both parents dead" 5 "Info missing"

* coresidence typology
tab1 hv112 hv114
gen cores_type=.

* hv112r and hv114r identify parents who are in the household AND are de jure residents

gen hv112r=0
replace hv112r=1 if hv112>0 & hv112<98

gen hv114r=0
replace hv114r=1 if hv114>0 & hv114<98

replace cores_type=1 if hv112r==1 & hv114r==1
replace cores_type=2 if hv112r==1 & hv114r==0
replace cores_type=3 if hv112r==0 & hv114r==1
replace cores_type=4 if hv112r==0 & hv114r==0

label define cores_type 1 "Living with both parents" 2 "With mother, not father" 3 "With father, not mother" 4 "Living with neither parent"

* combined orphanhood and coresidence typology
tab orphan_type cores_type
gen orphan_cores_type=.
replace orphan_cores_type= 1 if orphan_type==1 & cores_type==1
replace orphan_cores_type= 2 if orphan_type==1 & (cores_type==2 | cores_type==3)
replace orphan_cores_type= 3 if (orphan_type==2 & cores_type==2) | (orphan_type==3 & cores_type==3)
replace orphan_cores_type= 4 if orphan_type==1 & cores_type==4
replace orphan_cores_type= 5 if (orphan_type==2 | orphan_type==3) & cores_type==4
replace orphan_cores_type= 6 if orphan_type==4 & cores_type==4

label define orphan_cores_type 1 "With both parents" 2 "With one parent, non-orphan" 3 "With one parent, single orphan" 4 "With neither, non-orphan" 5 "With neither, single orphan" 6 "With neither, double orphan"


Before I tag the respective households & merge with IR file, I am not sure how to proceed.



[Updated on: Mon, 06 May 2019 07:48]

Report message to a moderator

 
Read Message
Previous Topic: Interviewer characteristics data
Next Topic: DISABILITY - UGANDA DHS 2016 ON SAS
Goto Forum:
  


Current Time: Sun Aug 25 06:07:47 Eastern Daylight Time 2019