Tech Tips

Automatic Recode in IBM SPSS Statistics

This tech tip demonstrates how to easily convert a string variable to a numeric variable using Automatic Recode. Users often have data in string format, yet they need it in numeric format to run specific analyses.

With IBM SPSS Statistics, you have the power to work inside a single, integrated interface to run descriptive statistics, regression, advanced statistics, and machine learning models. Its seamless integration with open source and quick help at your fingertips ensures you are well-equipped for any data analysis task, making you feel confident and capable.  

For example, we have data on regions and spending. We want to compare average spending across regions. We believe that spending is higher in London than in other areas, but we want to test this hypothesis using One-Way ANOVA. Our spend variable is numeric, but our region variable is string.

When we open the One-Way ANOVA dialog box, the region variable does not appear. This is where the Automatic Recode allows us to quickly create a new numeric region variable in our data. Each region will have a numeric code, and missing data will be included. Once we make our new numeric variable, we will see it in the One-Way dialogue box, and we can run our test.

To access Automatic Recode, users can follow these steps:

  1. Go to the Transform menu.
  2. Select Automatic Recode.
  3. In the dialog box, move the Variable(s) into the Variable> New Name box. Then, provide a name for the new variable and click the Add New Name button.
  4. Users can choose to recode starting from the lowest or highest value and treat blank string values as user missing. They can also use the same recoding scheme for all variables.
  5. Click OK to create your new variable.
Tools Covered

IBM SPSS Statistics

Related Solutions

Training

Tagged As IBM SPSS Statictics For Advanced

Need some help?

Image of three women working on laptops at a table for Version 1 SPSS Training

Learn how to use SPSS from the experts

With more than 20 years of delivering highly successful training programs, Version 1 offers a wide range of training options to best suit your requirements, enabling you to optimise your IBM SPSS Software, achieve your analytical goals and continually improve your results.

Related Tech Tips

Our SPSS experts have created a range of Tech Tips for IBM SPSS Statistics. Take a look through.

Arrange a free consultation to discuss your analytical needs and identify the best solution for you.