I need to create a new variable that categorizes survey responses (n=5 items, scored from 0-100) into three categories based on the number of responses that fall in a certain numerical range. I.e. if at least 3 scores fall into the 0-33 range, then the category in the new variable should equal L (where L means Languishing). If at least 3 scores fall into the 66-100, then the category in the new variable should equal F (where F means Flourishing). Else, new categorical variable should equal M (where M means Moderate).
The table below illustrates the type of data I'm working with.
ID | Var1 | Var2 | Var3 | Var4 | Var5 |
1 | 22 | 78 | 56 | 77 | 98 |
2 | 12 | 0 | 22 | 55 | 63 |
3 | 88 | 2 | 87 | 30 | 73 |
4 | 14 | 9 | 55 | 87 | 45 |
5 | 15 | 66 | 53 | 96 | 54 |