Recode

'Recode' can be used to reassign the values of existing variables into new values for a new variable. 'Recode' can also be used to group existing categories into a new category with a new value.

recode picture

[click to enlarge image]

The following recode options are available:

  1. Value - Recode a value to new value.
  2. Range: ... through - Select a range of values and recode to a new value.
  3. Range: Lowest through - Select a range beginning at the lowest value up to a specified value.
  4. Range: ... through highest - Select a range that begins with the specified value and ends at the highest value available.

Add a new value and label to the 'New Value' section. If the new value should be treated as missing check the 'As missing' box. Neither the value nor missing option need be unique as you can recode many values into the same new value.

If you choose to recode more than one value into one new value, the first label and missing information is used for all subsequent recodes to that value.

For example:
In this example, the new value '2' will be labelled 'Test' and will not be set to missing.

When all the necessary information has been provided press 'Add' to add the recode to the 'Added' list.

To delete a recoded value, check the box in front of the recode and press "Delete".

When all recoding operations have been specified, add a Name and Label for the new variable and press Ok. The new variable will then be added to the 'User defined variables' section for that dataset.