Apologies in advance if I do not ask this question correctly - this is my first post.
I have two data sets. One is a survey of 5000 people with numerous variables about the individuals including their 1st, 2nd and 3rd choices of university. I have another data set which includes a number of characteristics about the universities including their ranking. The University numbers in the 1st, 2nd and 3rd choices of the first data set match with the numbers given in the second data set. What would be the simplest way to create variables which would for example give ranking of 1st choice, ranking of 2nd choice ranking of 3rd choice ?
E.g. of data sets
ID | 1ST CHOICE | 2ND CHOICE | 3RD CHOICE |
1 | 4005 | 3904 | 5001 |
2 | 6789 | 4678 | 9803 |
and so on. The schools data set then looks like this:
School | Ranking | % females |....
4005 | 45 | 51 |
3904 | 36 | 53 |
5001 | 2 | 53 |
6789 | 17 | 48 |
and so on.
I cannot think of any merge or append strategy that would work in this case.
Thanks in advance for any help.
I have two data sets. One is a survey of 5000 people with numerous variables about the individuals including their 1st, 2nd and 3rd choices of university. I have another data set which includes a number of characteristics about the universities including their ranking. The University numbers in the 1st, 2nd and 3rd choices of the first data set match with the numbers given in the second data set. What would be the simplest way to create variables which would for example give ranking of 1st choice, ranking of 2nd choice ranking of 3rd choice ?
E.g. of data sets
ID | 1ST CHOICE | 2ND CHOICE | 3RD CHOICE |
1 | 4005 | 3904 | 5001 |
2 | 6789 | 4678 | 9803 |
and so on. The schools data set then looks like this:
School | Ranking | % females |....
4005 | 45 | 51 |
3904 | 36 | 53 |
5001 | 2 | 53 |
6789 | 17 | 48 |
and so on.
I cannot think of any merge or append strategy that would work in this case.
Thanks in advance for any help.
Comment