Changing values which are not in the correct order

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Posts: 5
Joined: Mon Aug 03, 2015 12:00 am

Changing values which are not in the correct order

Postby LearningStats2015 » Mon Aug 03, 2015 4:46 pm


Some of my variables have values which are not in the correct order. I exported the data from Qualtrics to SPSS and somehow they came in a strange order.

For example, variable 5 is a likert scale and the respondents had to choose on a scale from "Strongly Disagree (1)" to "Strongly agree(5)". When I go to the Variable View window on SPSS, and click on a specific value, I realize that it has been registered as "Strongly Disagree (4)", "Disagree (3)", "Neither agree nor disagree (7)". "Agree (5)", "Strongly Agree (2)".

So instead of being 1,2,3,4,5 it is 4,3,7,5,2. I can change the values on that same window however the data on the Data view window remains the same and when I am looking at the charts, the results make no sense.

Thanks a lot for your help, I appreciate it.
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Changing values which are not in the correct order

Postby GerineL » Tue Aug 04, 2015 9:11 am

I don't know why there is a mismatch between qualtrics and spss, so unfortunately I can't help you with that.
However, I can help you with recoding your variables in spss.\

The best way to go there is to write a syntax that will do this for you. There are many advantages to using syntax, the most prominent being that if you discover a mistake somewhere, you can just go back to the syntax, adjust it and run everything again, without loosing time.

What you want to do is recode your variables, this can be achieved via the following syntax:

Code: Select all

Recode variable1 variable2 variable3 (4 = 1) (3 = 2) (7 = 3) (5 = 4) (2 = 5)
into Rvariable1 Rvariable2 Rvariable3.
where it says variable1 variable2 variable3 you type the variable names of every variable that follows this pattern (i.e., 4 = 1 etc).
where it says Rvariable1 etc, you typt a new variable name that indicates how your recoded variables should be named, it can be anything you want.
Now spss creates new variables which are the recoded versions of the old ones.

Please note that you should recode every value. For instance, if 3 is correct (it should remain 3 in the new variable) you should also indicate that by (3 = 3) and not leave it out.

Who is online

Users browsing this forum: No registered users and 2 guests