The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Household crowding
Re: Household crowding [message #19811 is a reply to message #19808] Mon, 17 August 2020 10:40 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3039
Registered: February 2013
Senior Member

Following is a response from DHS Senior Analysis & Research Manager, Shireen Assaf:

Dear user,
The following Stata code can be used to compute the crowding index from the HR file. You can then recode this index to a binary variable if you like as I have shown with the variable "crowded".
Thank you.
Best,
Shireen

Stata code:
* calculating crowding index 
gen hhusual =hv012
replace hhusual=hv013 if hhusual==0
gen crowd=.
replace crowd=trunc(hhusual/hv216) if hv216>0
replace crowd=hhusual if hv216==0
replace crowd=. if hv216>=99
label var crowd "crowding index"

recode crowd (0/2=0 "No") (3/max=1 "Yes"), gen(crowded)
label var crowded "Three or more people living in the same room"
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: 10% 2011 census sample (South Africa)
Next Topic: Guidance regarding Gender Pooling in Liberia 2013 DHS data
Goto Forum:
  


Current Time: Wed Apr 24 22:25:57 Coordinated Universal Time 2024