I am trying to figure out how to analyze multiple select/multiple responses (i.e., ‘select all that apply’) questions in a survey I recently conducted.
SPSS has nice capabilities for analyzing online survey data and these types of questions so I am guessing that R has that and more. Dealing with these survey answers is a bit tricky in Excel. For example, show me a histogram/distribution everyone who likes strawberry and chocolate ice cream by age.
How do I structure the data set and what would be the commands to perform some basic tabulations of frequency, pareto, and logical AND OR functions?
I’ve not found anything that is quite as convenient as the multiple response sets in SPSS. However, you can create groups relatively easily based on common column names, and then use any of the
apply()function or friends to iterate through each group. Here’s one approach usingadply()from theplyrpackage: