Hi, statalisters, I'm working on a research project which need to generate the variable represents the household income. I have each individual's income information and have identified the head(head==1) and spouse(spouse==1). Now, I decide to define the household income as head's income plus his/her spouse's income if head is married or head's income if he's unmarried. In this case, I cannot simply use some command like
because there may be other members in the household who has income, like head's adault children who stay in living with their parents.So how can I achieve my goal, either using egen function or other approach? thank you.
Code:
bys hhid,egen hhincome=total(income)
Comment