I am analyzing survey data for 1000 respondents, and want to categorize them based on where they scored the highest across 7 metrics.
I have 7 continuous variables of scores for class subjects:
1. score_math
2. score_science
3. score_english
4. score_history
5. score_spanish
6. score_reading
7. score_writing
And I want to create a new variable (student_segments) that will return discrete values 1 through 7 depending on which of the above 7 variables returned the max score (i.e., if their score for math is their highest of the 7 scores it would return a value of 1 for the variable customer_segment... and 2 for science, 3 for english and so on)
Any advice on the best way to do this is very much appreciated!
Comment