Skip to Main Content

SPSS eTutor: Recoding Data: Collapsing Continuous Data

A Brief Guidebook for using SPSS at SUNY Empire

Recoding Data: Collapsing Continuous Data

There are times that you may need to recode data for one or more variables.. For example, you may want to combine attributes into ranges. Let’s assume that you have data that gives a respondent’s age in years. Perhaps you do not need or want the exact age but are interested in age groups (for example, 18-35 years, 36-54 years, over 55).

SPSS provides the tools to quickly create a new variable. I very strongly encourage you to create a new variable instead of simply changing the old variable. If you recode your ages into groups and then save it as age, you lose all of your detail (all of the individual ages). At some time later in the research you may wish to have this information. You can solve this problem by saving the recode as a new variable (perhaps named AgeRange).

To recode data in this way, go to: Transform, Recode into Different Variables.

In the open window, select the variable that you want to code (highlight and click on arrow or double click) and place it in the input variable field. Go to the Output Variable field, enter the name of your new variable (remember, 8 letters or less) and the new label (a longer – but still brief – description of the new variable).

Click on Change. Then click Old and New Values. You can either recode individual values of the original variable (make sure that value button is selected). Or, you can use the Range function (either range through, range lowest, range through the highest) and then recode it into the new variable value. In the following example, I decided to do this via range for the first two groups and then value to the highest for the 55 years and older category.

Click Continue, then OK. Your new variable will be listed at the end of your variables. Remember to keep notes when you recode a variable so that you have a record who you recoded it, because you then need to go to the variable view and define your values of your new, recoded variable!

 

Please note: If you need to request accommodations with content linked to on this guide or with your SPSS Software for your coursework, on the basis of a disability, please contact Accessibility Resources and Services by emailing them.  Requests for accommodations should be submitted as early as possible to allow for sufficient planning. If you have questions, please visit the Accessibility Resources and Services website.

 

Creative Commons License

 

SPSS eTutor by Dee Britton is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.