Recoding numeric variables allows you to create a new set of variables who have their values based on existing variables with a transformation applied. To start recoding open your data file, goto the "Editing" tab, select one or more numeric variables to which you want to apply the same transformation. Then click on "Recode" in the top menu bar, this will show you the following screen:
Now you have the following opions:
- Specify the destination variable names;
You can use the asterisks('*') in the destination name which will be replaced by the source variable name, in the example above this would mean that the destination variable would be named "Q02c". This feature makes it easy to determine destination names when multiple source variables have been selected. Another option is to write a comma delimited list of detination names, in which case you must make sure that each source variable has a destination name.
- The "Create as calculated variable" option, when checked, causes the destination variables to be created as calculated variables rather then standard data variables.
- Recode type, allows you to specify what type of recode you would like to perform:
- FLIP - Transposes sequenced labels; if your source variable has 6 labels coded 1-5 and 99999 the destination variable will be transposed thru this coding: 1=5, 2=4, 3=3, 4=2, 5=1, 99999=99999.
- ASC - Sorts the label descriptions alphabetically ascending and recode values starting at 1.
- DESC - Sorts the label descriptions alphabetically descending and recode values starting at 1.
- COPY - Duplicates the original variable
- CUSTOM - Allows you to specify a custom recode formula, as used in calculated variables. One addition is that in this formula you can use the '@' character as a placeholder for the current source-variable name. the formula "@+100" in the above example would be equal to "Q02+100". Again this allows the recoding of multiple variables in one go.
- The "Categories" list allows you to define the category codes and labels for the destination variables.
The "Custom formula" textbox and the "Categories" list are only available when using recode type custom, for all other types the category list of the source variable is used.