Reflecting a Variable in SPSS
Anne administered a questionnaire which includes items that comprise a scale intended to measure contingent self esteem. Some of the items need to be reflected (reverse scored). Item value 5 needs to be changed to item value 1, 4 to 2, 3 unchanged, 2 to 4, and 1 to 5. The cumbersome way to do this in SPSS is to use the recode transformation. I’ll show you the easy way using the compute function. All you need to do is replace the item score (IS) with (k + 1)-IS, where k is the largest possible item value. In this case, you wish to transform IS to 6-IS. I illustrate using variable “cse1.” Look at the initial distribution of responses on cse1:
In the data editor, click Transform, Compute. In the Compute Variable window, enter ‘cse’ as the target variable. As numeric expression, enter “6-cse1.” Click OK.
When SPSS asks “Change existing variable?” indicate OK.
Now look at the transformed distribution of cse1:
And now the cumbersome way. From the data editor, Transform, Recode, Into Same Variables. Scoot ‘cse1’ into Numeric Variables and click Old and New Values:
Enter Old Value Value 1, New Value Value 5, click Add. Old 2, New 4, Add, Old 4, New 2, Add, Old 5, New 1, Add.
Continue, OK.
SPSS Lessons
Karl L. Wuensch, Dept. of Psychology, East Carolina Univ., Greenville, NC 27858 USA
January, 2006