I am wondering how to identify mothers aged 20 to 50 years old with children compared to single women within the same age range without children in CPS data from 2022 onwards.
Is the ‘MOMLOC’ variable used to identify mothers?
Also, it would be great to obtain information/variable on the ages of the children (adopted/biological) associated with each mother, if possible!
MOMLOC is a variable constructed by IPUMS that reports the PERNUM value of the respondent’s probable mother (including biological, step, and adopted) within the household. This will only allow for identification of mothers who reside in the same household as their children; MOMLOC is unable to distinguish between mothers with children whose usual residence is outside the housing unit and non-mothers (both are assigned MOMLOC = 0). Since sampling occurs by household, no information is available on children living outside the home.
If this is not a significant issue for you, then I also recommend looking into NCHILD (number of own children in household), YNGCH (age of youngest own child in household), and other family interrelationship variables. These may be easier to use since they report the data on the mother’s record without needing to link directly to the child’s record (as with MOMLOC). However, if you want to obtain information such as the ages of all children, you will still need to use MOMLOC to link all of these records. You may also try using the Attach Characteristics tool, which allows you to attach a characteristic (from the set of variables in your data cart) of a person’s mother, father, spouse, or household head as a new variable on the person’s record. While this links information on the mother to the child’s record (the opposite of what you’re looking to do), it may still be a helpful tool for your analysis.
Hello! I wanted to give sample R code for identifying mothers of children under 14 y/o. Please let me know if this looks errored at all!!
It seems to me that the R code given at the bottom of this page (IPUMS USA) for connecting parents with children is a bit flawed. While I don’t read the other languages offered, I was able to come up with this R alternative:
This code chunk makes a df that takes the characteristics of children and renames PERNUM to be able to be merged back onto mothers of own children living in their same HH.
temp ← data %>%
select(YEAR, SERIAL, MOMLOC, AGE) %>%
rename(PERNUM = MOMLOC) %>%
filter(AGE < 14 & PERNUM > 0) %>% # captures children under 14 y/o who live with their mothers
group_by(YEAR, SERIAL, PERNUM) %>%
summarize(own_kids_u14 = n(), .groups = “drop”)
This code chunk joins the number of children back on to the original df and connects the number of children with their mother.
data_moth ← data %>%
left_join(temp, by = c(“YEAR”, “SERIAL”, “PERNUM”)) %>%
mutate(own_kids_u14 = if_else(is.na(own_kids_u14), 0, own_kids_u14)) %>%
filter(own_kids_u14 > 0)
1 Like
Thank you for sharing this code! As my colleague Isabel said in the other thread, we will review and modify the code as necessary. I’m sure that this will be helpful for users who can adapt the code for any other age threshold that is relevant in their work.
One aspect to be aware of in this approach is that some households with same-sex couples have two mothers identified for the same child; IPUMS USA offers the variable MOMLOC2 for identifying the second coresident mother.