Serial is the number for every house. for example: serial is 12, we can see in this house, there is a household and a spouse.
relate is the relations between household and other members in this house.
Foreignborn is a dummy variable means whether this observation is foreign born or not. If it is, the value will be 1.
So now i want to reshape my data. I need to put every information to the household in every house.
For example, in house 8, i need to move spouse and this spouse's foreignborn characteristic to the right side of household like table below. In house 12, i need to do same thing. So i can know whether this household has wife or not and whether his wife is foreign born or not.
I used reshape, but the error said the value of relate is not unique within serial, so i dont know how to solve with this issue.
Appreciated of your help.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0 Response to reshape data issue
Post a Comment