How to Convert Continuous Variables in SPSS: A Quick Guide

There may be situations in which one may want to convert continuous variables in SPSS to categorical. For example, one may want to find out how many females earn a starting salary of more than 80,000 using the data of the University of say Florida. For this numeric data, we need to change into categorical variables. In SPSS, this type of transformation is called the recoding of continuous variables to categorical.

Convert Continuous Variables in SPSS to Categorical

Step-by-Step Procedure

In SPSS there are three basic options for recoding the variables.

  • Recode into different variables
  • Recode into the same variable
  • DO IF syntax

Recode into different variables and DO IF syntax creates a new variable without modifying the original variable, while recode into the same variable will permanently overwrite the original variable. Best to record a variable into a different variable. To recode into different variables,

Click Transform > Recode into different variables

Convert Continuous Variables in SPSS to Categorical

The Recode into different variables dialog box will appear as:

Convert Continuous Variables to Categorical in SPSS Input Variable Output variable

The left-side pane of the dialog box lists all of the variables. Select the variable of interest to recode and move the variable to the right-side pane by clicking the arrow button in between the left and right-side dialog box. Let us have the salary variable to transform.

  • Input Variable -> Output
    The center text box lists the variables(s). In this case, we have only a salary variable.
  • Output Variable
    Define the name and label (label is optional) for your recoded variable(s) by typing them in the text field. The new name of the recoded variable (say) will be “new-salary” and then click change.
  • Old and New Variables
  • Click the “old and new values” to specify the categories of the selected variable. A new dialog box will appear, where one needs to specify how to transform the values will appear.
Convert Continuous Variables to Categorical in SPSS Old new Values

Old Values and New Values

The “Old -> New” box specifies the type of value of a recode variable. For example, the value of the recode variable (new value) is 1 or range of 20000 through the highest.

A short description of “Old Values” options.

  • Value:
    Enter a numeric code that represents the category. for example, give the value 1 for 1st category or group.
  • System Missing:
    Apply any system missing value(.).
  • Range or Through:
    This option is used to enter the lower and upper limits that should be coded. The recode category includes both limits (inclusive). For example, 20000 to 40000.
  • Range, Lowest through Value:
    Recode all values greater than or equal to some number.
  • All Other Values:
    Applies any value not explicitly accounted for by the previous recoding rules.

A short description of the “Old -> New” option:

Enter the required group/ category numerical code in the “New Value” and then click the add button below. Repeat this step for each group value that you wish to recode. All the required groups are recorded by adding an “Old -> New” box. Finally, click the continue button. Click the OK button to transform the continuous variable into a categorical variable.

https://gmstat.com, https://rfaqs.com

Leave a Comment

Discover more from Statistics for Data Analyst

Subscribe now to keep reading and get access to the full archive.

Continue reading