I’m trying to generate the equivalent of NCHLT5 for individuals living with (their own) children under 18 (including biological, step, and adopted children), and I’m having a hard time. Is there an efficient way of assigning parental status for these cases? I’ve tried the following code (in Stata). It relies on AGE, RELATE, and NCHILD. I’m not sure it’s right. I’m including children who might be labeled “other relatives” and “other nonrelatives,” along with foster children. Thanks very much for any help.
gen byte child_18 = 1 if age<18 & [relate==301|relate==303|relate==1260|relate==1001|relate==1242]
bysort cpsid: egen numkids_18 = sum(child_18) // sum here isn’t quite right; but it doesn’t matter – I’m just trying to distinguish households with any children under 18 from those with none
gen byte ownkids_18 = 1 if numkids_18>0 & numkids_18!=. & nchild!=0
Forgot to add an item that captures whether NCHLT5>0
NCHLT5 is assigned using IPUMS created family interrelationship variables MOMLOC and POPLOC. MOMLOC indicates whether the respondent’s mother appears in the same household, and if so, reports the mother’s person number (PERNUM). POPLOC does this analogously for the respondent’s father. You can read about how IPUMS constructed these family linkages in the documentation on new family interrelationship variables as well as in further documentation provided on the IPUMS USA website.
Finding the number of children under 18 in the household for each respondent will require you to count the number of times their PERNUM appears in MOMLOC or POPLOC for individuals within the household under the age of 18. Example #6 in this Stata blog post works through a solution for this type of problem. Note to restrict your matches to those under 18 years of age as MOMLOC and POPLOC report family interrelationships regardless of age.
1 Like