I have a data set with variables topicname1-topicname10. I would like to create a variable that gives me a count of the number of unique topics each respondent has within those sets of variables without counting missing responses and only counting each topic name once. I want to do this because sometimes topic names repeat, for example topicname1 can be books but then topicname5 can also be books, but in that instance I only want books to be counted once. I have tried multiple ways to do this including turning the wide data set long but no luck, was wondering if anyone knew a good strategy.
-
Login or Register
- Log in with
Comment