Household composition (part 1 & 2)

gen fhead=0
replace fhead=1 if q102==2 & q104==1
label var fhead "female head"

gen mhead=0
replace mhead=1 if q102==1 & q104==1
label var fhead "male head"

Repeat same procedure and create the following variables:  spouse, relative, nonrelative, ownchild and a variable representing total number of household members (this variable will not make any sense for you at the time being, however it will be very useful once you collapse your data)


Part 2:
egen hhcompid = concat (cluster underscore hhnum)
collapse (sum)  fhead mhead spouse relative nonrel ownchild totmem, by (hhcompid)

No comments:

Post a Comment