# PSPP for Beginners: Recoding Variables

## How to recode variables in an existing variable

Recoding can also be done for the same variable. This will change the values of the variable to a new coding scheme.

The original file uses a code of 1 = male, 2 = female, 3 = non-binary. Let's say that we want to change this coding scheme to start at zero, with 0 = male. To make this change select Transform > Recode into Same Variables.

The first step is to select the variable to be recoded and move it to the Variables field. Next, enter the new coding scheme. This works like the Recode into Different Variables command. This simple example will convert all 1 values to 0 and all 2 values to 1. Another entry can be added to convert existing 3 values to 2. Click on the "Continue" and "Ok" buttons to make this desired coding change.

Making this change will convert the 1, 2, 3 code to 0, 1, 2, respectively. Be aware that the original data will be lost. Make sure that this new coding scheme is what you really want before performing this command. It's also a good idea to update the value lables in the variable view to reflect the new coding scheme.

Home | Start | Variables | Data | Descriptive | Relationship | Inferential | Advanced | Video

This work is licensed under a Creative Commons Attribution 4.0 International License that allows sharing, adapting, and remixing.