Hello,
I'm trying to create a new variable in a data set which would act as a scale reflecting the number of positive responses among a group of other variables.
So, there are 5 variables with categorical, binary responses (yes/no), and I want to make a new variable which would have 6 categorical responses which might be All Five, Four, Three, Two, One and None. For example, an observation with a 'Yes' response to 2 of the 5 variables would warrant a "Two" in my new variable. Three 'Yes's' would be a Three, and so on.
Making the 'All 5' and 'None' is easy, and I know I could sort of use brute force and set up if-then statements for all the possible combinations for 2, 3, and 4, but I feel there may be a simpler and less error-prone way to go about this in a data statement. Any ideas?
Thank you in advance!
... View more