The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » India » Family Structure (Creating family structure using household data file (DHS))
Family Structure [message #27602] Sun, 10 September 2023 01:17 Go to next message
Abbas is currently offline  Abbas
Messages: 2
Registered: April 2023
Member

Hello,

I have come across numerous helpful responses regarding the creation of family or household structures using the Person file (PR file) from DHS data. However, this approach typically involves using the 'collapse' command in Stata, which removes other variables from the dataset and ultimately leads to the household sample size.

I would like to inquire if it is possible to create a family structure, taking into account the age and sex of the members, using the Household file (HR).

Thank you in advance for your assistance and insights.
Re: Family Structure [message #27609 is a reply to message #27602] Mon, 11 September 2023 12:24 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3199
Registered: February 2013
Senior Member
Following is a response from Senior DHS staff member, Tom Pullum:

Yes, it is possible to construct measures of household structure from the HR file, but in Stata it is clumsier. Below I will paste an example using the PR file and "egen total" rather than "collapse". It then goes to one record per household by keeping the PR record for the household head (hv101=1). This will keep all the household-level variables (usually hv2*).

Or, with the "collapse" approach, you could include "(first) hv2*", for example, in the collapse command, and this would keep the hv2* variables from the first person in the household. (That's the person with hvidx=1, and in most surveys, including IA7E, the NFHS-5, that's always the household head.) Let us know if you have other questions about how to do this.

* Identify households with this structure:
* Spouse of head not present; children of head present; all children of head are unmarried
* Household structure is defined entirely in terms of de jure household members (hv102=1)

* head: hv101==1; spouse, hv101==2, child: hv101==3
* unmarried: hv115==0

use "...IAPR7EFL.DTA", clear 

keep if hv102==1

gen     spouse=0
replace spouse=1 if hv101==2

gen     child=0
replace child=1 if hv101==3

gen     unmarried_child=0
replace unmarried_child=1 if hv101==3 & hv115==0

egen nspouse         =total(spouse),          by(hv024 hv001 hv002)
egen nchild          =total(child),           by(hv024 hv001 hv002)
egen nunmarried_child=total(unmarried_child), by(hv024 hv001 hv002)

* reduce to one line per household
keep if hv101==1
drop spouse child unmarried_child
gen sex_of_head=hv104
gen age_of_head=hv105
gen     spouse_absent=0
replace spouse_absent=1 if nspouse==0

rename nchild nchildren
rename nunmarried_child nunmarried_children
gen nmarried_children=nchildren-nunmarried_children

* The households with the desired structure will be those with
*   spouse_absent=1, nchildren>0, and nmarried_children=0.
tab sex_of_head spouse_absent if nchildren>0 & nmarried_children==0

Previous Topic: which state does v101 equal to 37 represent in India data?
Next Topic: Calculation of OOPE for delivery care using NFHS-4 , India data
Goto Forum:
  


Current Time: Mon Nov 25 04:02:04 Coordinated Universal Time 2024