Hello,
I have some panel data from a household survey and I am trying to link parent's characteristics to their children, such as the parent's nationality for example. Each person in the dataset has multiple rows and the data has already been sorted into households.
As you can see from the table, children in the dataset have MotherID which gives the PersonID of their mother, yet I am not sure how to use this to give the MothersNationality by matching PersonID and MotherID.
Using this example above, how would I be able to show the MothersNationality as English for PersonID==3 & 4, and Spanish for PersonID==6?
Thank you in advance for your time,
Adam
I have some panel data from a household survey and I am trying to link parent's characteristics to their children, such as the parent's nationality for example. Each person in the dataset has multiple rows and the data has already been sorted into households.
As you can see from the table, children in the dataset have MotherID which gives the PersonID of their mother, yet I am not sure how to use this to give the MothersNationality by matching PersonID and MotherID.
HouseID | PersonID | MotherID | Nationality | MothersNationality |
1 | 1 | English | ||
1 | 1 | English | ||
1 | 1 | English | ||
1 | 2 | Italian | ||
1 | 2 | Italian | ||
1 | 3 | 1 | French | |
1 | 3 | 1 | French | |
1 | 3 | 1 | French | |
1 | 3 | 1 | French | |
1 | 4 | 1 | French | |
1 | 4 | 1 | French | |
2 | 5 | Spanish | ||
2 | 5 | Spanish | ||
2 | 6 | 5 | Scottish | |
2 | 6 | 5 | Scottish | |
2 | 6 | 5 | Scottish |
Using this example above, how would I be able to show the MothersNationality as English for PersonID==3 & 4, and Spanish for PersonID==6?
Thank you in advance for your time,
Adam
Comment