The RECODE command
A common task that analysts need to tackle involves modifying the original codes assigned to a field. There are a variety of reasons to revise values of a variable, and SPSS Statistics provides a handy command designed to meet this need. For this example, consider the SATISF.SAV
file that ships with the software and can be found in the SAMPLES
folder.
This dataset contains a set of fields related to customer satisfaction with their shopping experience. The following screenshot shows the details for the Overall Satisfaction
question:

As we can see from the preceding screenshot, this has five response categories ranging from Strongly Positive
(5) to Strongly Negative
(1).
Creating a dummy variable using RECODE
To create a field that indicates whether a shopper gave a positive response or not, the RECODE
transformation can be used.
While there are occasions when it is reasonable to reassign the code of an existing variable, it is generally a better strategy to map the new values...