HerfstkleurenHelpdesk IBM SPSS Statistics 20

For students from Arnhem Business School
Home Codebook Data Data editing Analysis Graphs Settings Links Methods

Data Editing Automatic Recode

Automatic Recode creates a numeric variable based on a string variable. The values of the string variable are used as value lables for the new variable.

The reason for executing this transformation is that string variables are not as easy to handle as numeric variables.
Furthermore, some things can't be done using string variables. For example, if you want to compare the average scores on a certain variable for males and females a t-test is appropriate. But this procedure doesn't accept a string variable with codes M and F. The independent variable that defines the groups has to be numeric.

The use of string variables also causes problems in labeling of graphs.

Introducing the example:

We are given a data file with article codings, cost price (VAT excluded) and sales price (VAT included).



Before we start working with this file we would like to have a numeric equivalent of the variable v01. We procede as follows:


Using Automatic Recode:

Select from the menu:
Transform > Automatic Recode

Next complete the dialog box. You will have to provide a new name for the new variable.
Don't forget to confirm this by clicking the button add new name :

The result in the Variable View:

Note: The Variable Label has been copied to the new variable.

In the SPSS output the definition of the new variable is presented like this:

output automatic recode etc.


Last modified 30-10-2012

Jos Seegers, 2009; English version by Gé Groenewegen.