Responses saved as separate variables | Experience Community
Skip to main content
Solved

Responses saved as separate variables

  • Mar 26, 2024 6:22 PM UTC
  • 5 replies
  • 328 views

Forum|alt.badge.img+1

Hello, 

 

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:

  1. change Q1-Q8 with the name of your variables.
  2. 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.

View original

5 replies

RickB
Level 4 ●●●●
Forum|alt.badge.img+22
  • Level 4 ●●●●
  • Mar 27, 2024 9:50 AM UTC

Hey @anteko100, 

I don't quite understand what you mean.

If you save the data in Qualtrics do you get this, or do you export the data (to which program)?


Forum|alt.badge.img+1
  • Author
  • Mar 27, 2024 10:19 AM UTC

Thanks for the reply @RickB 

Once exported to SPSS (.sav), the multiple choice question (about gender, containing 8 different choices) becomes saved as 8 different variables.  

So if a person chose male, it shows as one of those 8 variables (male) with value 1 and the remaining 7 are empty.

Let me know if this is more clear!

 


RickB
Level 4 ●●●●
Forum|alt.badge.img+22
  • Level 4 ●●●●
  • Answer
  • Mar 27, 2024 2:15 PM UTC

Hey @anteko100 ,

 

I think this is a SPSS problem. In SPSS you can do this: 

 

Follow this code and:

  1. change Q1-Q8 with the name of your variables.
  2. 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.


Forum|alt.badge.img+1
  • Author
  • Apr 2, 2024 10:08 AM UTC

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?

 


RickB
Level 4 ●●●●
Forum|alt.badge.img+22
  • Level 4 ●●●●
  • Apr 3, 2024 7:17 AM UTC

This is a problem with the results.

maybe it will work if you fill the empty cells.
you can do this at:
transform -> recode into different variables