Dear Experts,
I want to perform Sequence Analysis about individual migration history. However, I have difficulty in creating "order variable" that contains the seqeuence of age when migration happened. Every id in my dataset has a different starting point in terms of migration age. So i want to standardize them as an order variable in each id. Let me show the example:
So... i want to create new variable as a representation of age in standard form (start from 12 years old to 40 years old in each id) as follow :
and so on...
Can anyone help how i make this dataset?
Thank you in advance and I'm so sorry for trivial question..
Best regards
nang
I want to perform Sequence Analysis about individual migration history. However, I have difficulty in creating "order variable" that contains the seqeuence of age when migration happened. Every id in my dataset has a different starting point in terms of migration age. So i want to standardize them as an order variable in each id. Let me show the example:
id | age | destination |
1 | 12 | village |
1 | 13 | city |
1 | 15 | city |
2 | 14 | village |
2 | 35 | village |
2 | 40 | city |
3 | 15 | city |
3 | 20 | city |
4 | 35 | village |
So... i want to create new variable as a representation of age in standard form (start from 12 years old to 40 years old in each id) as follow :
id | age | destination |
1 | 12 | village |
1 | 13 | city |
1 | 14 | .. |
1 | 15 | village |
1 | 16 | ... |
1 | ...(17 to 39) | ... |
1 | 40 | ... |
2 | 12 | ... |
2 | 13 | ... |
2 | 14 | village |
2 | ...(15 to 34) | ... |
2 | 35 | village |
2 | ...(36 to 39) | ... |
2 | 40 | city |
Can anyone help how i make this dataset?
Thank you in advance and I'm so sorry for trivial question..
Best regards
nang
Comment