The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Family arrangements...
Family arrangements... [message #8775] Wed, 16 December 2015 15:53 Go to next message
Juwohnemmi is currently offline  Juwohnemmi
Messages: 1
Registered: December 2015
Location: Nigeria
Member
Hello,

I'm trying to explore family arrangements and from what I saw in the DHS report....there are under18 children living with only mother either because father is dead or the father is not living with them...

I've been able to generate a variable on children whose father is dead...but creating a variable for children whose father is alive but not living in the household is giving me a tough time.....

I need help please......
Re: Family arrangements... [message #8904 is a reply to message #8775] Tue, 12 January 2016 13:37 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3190
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:

The following lines will produce everything you could want and will match with the orphanhood and coresidence tables in the reports.

* Construct the recodes used in "Children's living arrangements and orphanhood"

* orphanhood typology
tab hv111 hv113

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<.)

* 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

* 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
replace orphan_cores_type= 3 if orphan_type==2 & cores_type==2
replace orphan_cores_type= 4 if orphan_type==1 & cores_type==3
replace orphan_cores_type= 5 if orphan_type==3 & cores_type==3
replace orphan_cores_type= 6 if orphan_type==1 & cores_type==4
replace orphan_cores_type= 7 if orphan_type==3 & cores_type==4
replace orphan_cores_type= 8 if orphan_type==2 & cores_type==4
replace orphan_cores_type= 9 if orphan_type==4 & cores_type==4
replace orphan_cores_type=10 if orphan_type==5

#delimit ;
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";

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

label define orphan_cores_type 1 "With both parents" 2 "With mother only, father alive"
3 "With mother only, father dead" 4 "With father only, mother alive"
5 "With father only, mother dead" 6 "With neither, both alive"
7 "With neither, only father alive" 8 "With neither, only mother alive"
9 "With neither, both dead" 10 "Survival info missing";
#delimit cr

label values orphan_type orphan_type
label values cores_type cores_type
label values orphan_cores_type orphan_cores_type

* not living with a biological parent
gen with_neither_parent=0
replace with_neither_parent=1 if orphan_cores_type>=6 & orphan_cores_type<=9

* one or both parents dead
* note that the allocation of hv111 and hv113 codes other than 0 and 1 is
* slightly different in the table than in "Info missing" above
gen one_or_both_parents_dead=0
replace one_or_both_parents_dead=1 if hv111==0 | hv113==0

* unweighted distributions
tab orphan_cores_type
tab with_neither_parent
tab one_or_both_parents_dead

* weighted distributions
tab orphan_cores_type [iweight=hv005/1000000]
tab with_neither_parent [iweight=hv005/1000000]
tab one_or_both_parents_dead [iweight=hv005/1000000]
Previous Topic: Trend analysis of dichotomous categorical outcome variable on stata
Next Topic: Stata Help
Goto Forum:
  


Current Time: Sat Nov 9 03:49:44 Coordinated Universal Time 2024