Hello, I'm working with IPUM-CPS data and am trying to differentiate between different family units within a household. I have several variables to work with including a household serial ID, a person number within the household, a family type variable that states whether the family is a primary family, secondary related family, or a secondary unrelated family, as well as a family relationship variable that identifies the primary references person, spouse, and child in these secondary families. I also have pointer variables that ID the location of the mother and father of the individual in the household (if any).
I can uniquely identify families within an household using the concat command and combining the household serial and the family type variable - as long as there aren't more than one secondary related families or more than one secondary unrelated families. If there is more than one, the concat command I just described would create a unique ID where they are the same family (see data snapshot below).
Here is a snapshot of the variables I've described in two households. I need to be able to differentiate the different related subfamilies in these households by creating a new unique identifier within each household for these subfamilies. As you can see, persons #3-5 are a family and 6-7 are a family. In the next household, 5-7 are a family and 8-11 are a family. I think there may be a way to do identify these subfamilies using the variables indicating the mothers' and fathers' location in the household, or perhaps the other relationship variables, but I can seem to puzzle this one out. Does anyone have any data management tricks that could group these observations together?
Thanks so much!
I can uniquely identify families within an household using the concat command and combining the household serial and the family type variable - as long as there aren't more than one secondary related families or more than one secondary unrelated families. If there is more than one, the concat command I just described would create a unique ID where they are the same family (see data snapshot below).
Here is a snapshot of the variables I've described in two households. I need to be able to differentiate the different related subfamilies in these households by creating a new unique identifier within each household for these subfamilies. As you can see, persons #3-5 are a family and 6-7 are a family. In the next household, 5-7 are a family and 8-11 are a family. I think there may be a way to do identify these subfamilies using the variables indicating the mothers' and fathers' location in the household, or perhaps the other relationship variables, but I can seem to puzzle this one out. Does anyone have any data management tricks that could group these observations together?
Thanks so much!
Comment