I am working with data from a multiple choice survey question. Survey respondents were able to select options A, B, C and/or D. The data file simply lists the response(s) they chose, with no spaces, commas or semicolons in between. For example, the data for a respondent who selected options A and C would simply be "AC"; the data for a respondent who selected options A, B, C and D would be "ABCD".
I need to create 4 new variables that indicate whether the respondent selected each of the 4 choices (i.e., if they didn't select A then A = 0; if they did select A then A = 1, and so on). How do I do this with my string data, given that there are no spaces or commas between the responses? I would greatly appreciate your help!