Recode a variable

Overview

Recoding a variable allows you to collapse the categories of a categorical variable or transform a numeric variable into a categorical variable.

Only categorical variables (those with discrete values, i.e. pick list) or numeric variables can be recoded.  However, you can use the Calculated Variable functionality to collapse any type of variable into a categorical variable.


Required Role(s)

  • Data Set Management

Steps

  1. From the Data Sets main menu item, edit an existing data set or create a new data set
  2. Select the Variable Finder tab in the left panel
  3. Locate the variable to be recoded
  4. Click on the Recode icon

    Variables without a Recode icon are not categrical or numeric and cannot be recoded.

  5. Attributes tab
    1. Name:  Enter a name for the recoded variable
    2. Description:  Optionally enter a description
    3. Code:  Enter a unique code
    4. Include Missing:  Mark the checkbox to include missing values
  6. Recoded Values tab
    1. Optional:  Click on Show Distributions to see the number of subjects with each pick list option
    2. Categorical Variables
      1. Value:  Enter a new value for the recoded category
      2. Display Name:  Enter a name for the recoded category
      3. Mark the boxes next to the pick list items that will be collapsed into the new recoded category
      4. Click Recode
    3. Numeric Variables
      1. Value:  Enter a new value for the recoded category
      2. Display Name:  Enter a name for the recoded category
      3. Begin Value:  Enter a beginning value
      4. End Value:  Enter an ending value
      5. Click Recode
  7. Click Continue
  8. The Included Variables tab will contain the recoded variables in the list of variables

    To edit a recoded variable click on the variable name

  9. Click on Save and Return or Save

: