Hello,
Apologies if this question is answered elsewhere, my searches have not yet located it.
I am using the Survey of Income and Program Participation panel dataset, and have combined 4 panels from 96-08. The dataset surveys multiple people per household, all multiple times. To use the data I created a unique participant ID for all individuals. egen sippid = concat(spanel ssuid epppnum).
I want to associate the spouse's country of birth (cob) with the record of the spouse for all individuals (or at the least with the reference person). I have the id variable and also created a unique household id, as well as variables for marital status (1, single, 2 married...) and a variable for the relationship of the person to the reference person (errp: errp==1 is reference person, errp==3 is spouse of the reference person). Data looks something like this (cob is numeric, just used names for example purposes here):
id hhid ms errp cob
1 1 2 1 usa
2 1 2 3 usa
3 1 1 4 usa
4 2 2 1 .
5 2 2 3 mexico
I am not sure how to do this, everything I think through doesn't make sense. Initially I thought I would just extract all the spouses with their id and cob and merge them back on their reference person, but I can't quite get 2 files that will fit together.
I created a unique variable for the id of the reference person of the hh (egen refperhhsippid=concat(spanel ssuid shhadid ehrefper)) and thought I might be able to use that in matching them but I keep ending up confusing myself.
Any chance you can help me figure this out? If my questions/data set up is not clear, or this is overly simple and I can find the answer elsewhere, please let me know and I will try again, I'm new to asking questions here.
Thank you!
Jen
Apologies if this question is answered elsewhere, my searches have not yet located it.
I am using the Survey of Income and Program Participation panel dataset, and have combined 4 panels from 96-08. The dataset surveys multiple people per household, all multiple times. To use the data I created a unique participant ID for all individuals. egen sippid = concat(spanel ssuid epppnum).
I want to associate the spouse's country of birth (cob) with the record of the spouse for all individuals (or at the least with the reference person). I have the id variable and also created a unique household id, as well as variables for marital status (1, single, 2 married...) and a variable for the relationship of the person to the reference person (errp: errp==1 is reference person, errp==3 is spouse of the reference person). Data looks something like this (cob is numeric, just used names for example purposes here):
id hhid ms errp cob
1 1 2 1 usa
2 1 2 3 usa
3 1 1 4 usa
4 2 2 1 .
5 2 2 3 mexico
I am not sure how to do this, everything I think through doesn't make sense. Initially I thought I would just extract all the spouses with their id and cob and merge them back on their reference person, but I can't quite get 2 files that will fit together.
I created a unique variable for the id of the reference person of the hh (egen refperhhsippid=concat(spanel ssuid shhadid ehrefper)) and thought I might be able to use that in matching them but I keep ending up confusing myself.
Any chance you can help me figure this out? If my questions/data set up is not clear, or this is overly simple and I can find the answer elsewhere, please let me know and I will try again, I'm new to asking questions here.
Thank you!
Jen
Comment