Hi Statalist,
I have some data as follows
As you can see, each id will have two years of data
Each id has its own number in the family, and the number of the spouse in the family (spouse number 0 means no spouse)
The first three codes of the id are the family number. The same first three yards means they belong to the same family
How can I combine the same family scattered in several profiles into "one profile for one family"
thanks!
I have some data as follows
Code:
id year population code spouse population code 10201 2015 1 2 10201 2016 1 2 10202 2015 2 1 10202 2016 2 1 10301 2015 1 0 10301 2016 1 0 10401 2015 1 0 10401 2016 1 0 10402 2015 2 3 10402 2016 2 3 10403 2015 3 2 10403 2016 3 2
Each id has its own number in the family, and the number of the spouse in the family (spouse number 0 means no spouse)
The first three codes of the id are the family number. The same first three yards means they belong to the same family
How can I combine the same family scattered in several profiles into "one profile for one family"
thanks!

Comment