Recoding refers to changing the value assigned to a particular category of a variable or question. For example, if the value of 1 equates to men and 2 to women, we could recode the value so that a 0 equates to women.
Method
Where the question type is numeric, variables can be recoded by modifying their Value Attributes. This is done by either:
- Right-clicking on the row or column category names in the Outputs Tab and selecting Values.
- Pressing the on the Variables and Questions tab.
This brings up the Value Attributes dialog box. From here you can either:
- Replace the values in the Value column.
- Use Recode Rules.
Excluding categories
If a category is selected as Missing Data in the Value Attributes it is recoded as missing data (NaN).
If a category's value is changed to NaN it is recoded as missing data (NaN) when the variable is used in the construction of other variables and when the average is computed, but the category will still be shown on any tables when the question is categorical.