Hello SAS Community, I am working on analyzing a multiple response survey question. It has seven possible selections and respondents were allowed to choose as many of the selections as applied to them. Unfortunately, this has left me in a bit of an analysis bind. The variable was sent to me as a character variable, and all the possible selections were concatenated into one long string. So the variable values look something like: 1 010306 2 0204 3 01 4 0502 5 0205 6 01040507 . . . As it is, this variable is not providing me with much information. I would like to create a new variable for analysis, where if the original variable contained lets say 01somewhere in its string it would be counted as 1, 02 would be 2, etc. Is there a way to subset observations into a new variable based on the whether it contains a specific character combination? As always, I greatly appreciate your help and expertise! Thanks!
... View more