I have dataset with a many survey responses and many variables. One variable a string variable named Q3 in which the values look like this:
1,2
1,3,12
1,2,3,12,7,8,9
2,3,9
... (yes, the values are not entirely in order, though this is probably not a big deal)
I would like to parse this into a set of binary dummy variables, one for each possible value in Q_3, say Q3_1, Q3_2, Q3_3, ... Q3_12. For example, the values of Q3_9 for the data above would be:
0
0
1
1
I've played with some do loops using the SCAN function, but I have not been able to make it work. Can't find a forum question or help doc that addresses quite this situation.
... View more