Hi, everyone! I am currently working on panel data concerning parental unemployment to children's happiness using UKHLS. However, I have problems merging datasets while matching parents' IDs with children's IDs. I have parents and their children in the ID column. What I would like to do is to match those children with their parents, by using the father and mother identification numbers (variables fatherID and motherID). I am using Stata 17.0
Within every row of children's sample, I have both of their parent's unique ID (e.g. children's ID = 1003, their father's ID = 1001, mother's ID = 1002). I simply don't know how to merge these so I can have parental job status within the children's sample.
The children's sample came from a different file (the youth survey) than the parents. Furthermore, the panel data is unbalanced and some ID's are missing (e.g. children's ID = 2002, their father's ID = 2001, mother's ID = inapplicable)
Below is an example from the youth survey, which I would like to match with the parent's survey file. I used excel to create an example, of course the data I am using from UKHLS is different. I think using these will be more intuitive



Here is an example from the adult survey

Here is what I hope to get

Here are some stylized notes about the data:
Within every row of children's sample, I have both of their parent's unique ID (e.g. children's ID = 1003, their father's ID = 1001, mother's ID = 1002). I simply don't know how to merge these so I can have parental job status within the children's sample.
The children's sample came from a different file (the youth survey) than the parents. Furthermore, the panel data is unbalanced and some ID's are missing (e.g. children's ID = 2002, their father's ID = 2001, mother's ID = inapplicable)
Below is an example from the youth survey, which I would like to match with the parent's survey file. I used excel to create an example, of course the data I am using from UKHLS is different. I think using these will be more intuitive
Here is an example from the adult survey
Here is what I hope to get
Here are some stylized notes about the data:
- There are more unemployed women with children than men, so it will be unbalanced.
- Most unemployed people do not live with their spouse
- People may change their partner/spouse, so a children could have different motherID or fatherID
- However, the most important thing is to have fatherjobstatus and motherjobstatus in children's sample which could be gathered by matching parental ID (father ID and mother ID) with children ID
Comment