The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » family structure
Re: family structure [message #18062 is a reply to message #18035] Tue, 03 September 2019 14:46 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3214
Registered: February 2013
Senior Member
Following is a response from DHS Research & Data Analysis Director, Tom Pullum:

Below are some Stata lines that will help get you started, using the 2017 DHS survey of the Philippines to identify nuclear households. The lines tell you whether the household contains one person with hv101=1, one person with hv101=2, at least one person with hv101=3, and no other persons. Some modifications are possible, e.g. using hv111-hv114 to check whether each child of the household head is also a child of the spouse of the household head. You might also want to check the ages of the children (it's possible that some children are adults). No matter how carefully you define your household types, a few households will probably be hard to classify. A limitation is that you do now know how everyone in the household is related to everyone else. Good luck

* identify nuclear households: head, spouse, children

use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\PHPR70FL.DTA" , clear

cd e:\DHS\DHS_data\scratch

keep hv001 hv002 hvidx hv101-hv105 hv111-hv114 
label list HV101

sort hv001 hv002 hvidx
save PHtemp.dta, replace

gen n=1
levelsof hv101, local(levels_hv101)
foreach li of local levels_hv101 {
gen n_`li'=0
replace n_`li'=1 if hv101==`li'
}

collapse (sum) n*, by(hv001 hv002)

gen family_type=.
replace family_type=1 if n_1==1 & n_2==1 & n_3>0 & n==n_1+n_2+n_3

tab family_type, m


* construct other types
* then can merge back to PHtemp.dta
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Panel data creation in women file of different round of DHS in India
Next Topic: Merging of couple and children dataset
Goto Forum:
  


Current Time: Sun Dec 22 04:21:58 Coordinated Universal Time 2024