Hi,
I am working on the ACS 2023 microdata set. I want to identify the following categories for individuals:
• Living alone
• Living only with a spouse
• Living only with a spouse and children
• Living only with children
• Living with others (related or unrelated)
I am using Stata 17.
I identified individuals living alone with the following formula:
replace livingalone = 1 if hhtype == 2 | hhtype == 3 | hhtype == 4 | hhtype == 6 & famsize == 1
To identify individuals living only with their spouses/partners, I used the following formula:
replace livingwspouse = 1 if hhtype == 1 & nchild == 0 & famsize == 2
For individuals living only with children:
replace livingwchild = 1 if nsubfam == 0 & momloc == 00 & poploc == 00 & momloc2 == 00 & poploc2 == 00 & nsibs == 0 & sploc == 0 & gchouse == 1 & (hhtype == 2 | hhtype == 3) & (nchild == 1 | nchild == 2 | nchild >= 3 | nchild == 4 | nchild == 5 | nchild == 6 | nchild == 7 | nchild == 8 | nchild == 9)
For individuals living with children and a spouse:
replace livingwsc = 1 if hhtype == 1 & nsubfam == 0 & momloc == 00 & poploc == 00 & momloc2 == 00 & poploc2 == 00 & nsibs == 0 & gchouse == 1 & (nchild == 1 | nchild == 2 | nchild == 3 | nchild == 4 | nchild == 5 | nchild == 6 | nchild == 7 | nchild == 8 | nchild == 9)
For individuals living with others:
replace livingwothers = 1 if (inlist(hhtype, 2, 3, 5, 7)) & sploc == 00 & nchild == 0 & inlist(relate, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
I want to identify with whom individuals live based on the categories I created above. My results are probably/strongly incorrect because I could not choose the right variables to match members of the same household. Could you please help me with this?