From the course: SPSS: Data Visualizing and Data Wrangling

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Reversing values with syntax

Reversing values with syntax

- [Instructor] Sometimes you have to just turn things around. One of the common tasks in data prep is reversing variables. So for instance, if you're doing a survey and you're measuring things on a one to seven, strongly disagree to strongly agree scale, maybe you actually need some of those to go seven to one, because higher scores should indicate more of something and you need to adjust your data to allow for that. Sometimes when people do surveys, they intentionally reverse the direction of items so that people don't get stuck in a rut and just give, you know, five stars on absolutely everything. And so reversing scores is a fundamental task. Fortunately, it's really easy to do in SPSS. Now, you can do it with the data transform functions, but I'm going to show you how to do it with syntax, again, because it makes it very explicit and it makes it very repeatable. So I'm going to start with this little toy data set I've created where we have three different variables. They all show…

Contents