An Easy Way to Reverse Code Scale items

June 29, 2012
By

(This article was originally published at The Analysis Factor, and syndicated at StatsBlogs.)

Before you run a Cronbach’s alpha or factor analysis on scale items, it’s generally a good idea to reverse code items that are negatively worded so that a high value indicates the same type of response on every item.

So for example let’s say you have 20 items each on a 1 to 7 scale. For most items, a 7 may indicate a positive attitude toward some issue, but for a few items, a 1 indicates a positive attitude.

I want to show you a very quick and easy way to reverse code them using a single command line. This works in any software.

Rather than specifying each individual recoded value–a 1 to 7, 2 to 6, and so on, just subtract the values from a constant one value higher than the highest value on the scale.

For example if OldVariable is reverse coded and on a 1 to 7 scale, in SPSS, do this:

COMPUTE NewVariable = 8 – OldVariable.  (You can also do it in the menus in Transform–>Compute).

In SAS, do this within a data step.

Data scale;
Set scale;
NewVariable = 8 – OldVariable;
Run;

The value from which you subtract your old variable will always be one value higher than the highest value you have. So I subtracted my old variable from 8 because I have a 1 to 7 scale. If I had a 1 to 5 scale, I would subtract my old variable from 6.

You can see how it works:

8-7=1
8-6=2
8-5=3
8-4=4
8-3=5
8-2=6
8-1=7

If you only have to reverse code one item, this isn’t a big deal.  But I have found that data cleaning and creating new variables often is the step in data analysis that takes the longest. I use whatever shortcuts I can.


Bookmark and Share

Like this post?
Enter your email address to have new posts delivered:



Please comment on the article here: The Analysis Factor

Tags: , , , ,


Subscribe

Email:

  Subscribe