I’ve conducted a survey in which I designed the gender-choice question to be a multiple answer question. As it was my first time using the platform I didn’t expect to have my data for this position saved as separate variables with one value (1 or null) for every choice.
I was wondering if there’s a method to combine them or perhaps rearrange somehow to one variable containing multiple values (eg. 1- male, 2-female, etc.)
I would appreciate some help thank you!
Best answer by RickB
Hey @anteko100 ,
I think this is a SPSS problem. In SPSS you can do this:
Follow this code and:
change Q1-Q8 with the name of your variables.
Change new_var into the name of your new combined variable.
IF (Q1 = 1) new_var = 1.
IF (Q2 = 1) new_var = 2.
IF (Q3 = 1) new_var = 3.
IF (Q4 = 1) new_var = 4.
IF (Q5 = 1) new_var = 5.
IF (Q6 = 1) new_var = 6.
IF (Q7 = 1) new_var = 7.
IF (Q8 = 1) new_var = 8.
As you run the code, you should have the new_var in your data view and variable view. You can name the categories in the “variable view” tab.
This sounds logical however it does not work for me, except for creating a new variable (new_var) which is empty for all of the observations (whether or not an observation had one or more of the initial variables filled) as well as it does not have any values assigned to it.
Do you have any idea if its an issue with the code itself or the type of the question I put in the survey?