Page 1 of 1
Reverse order of ordinally scaled variables
Posted: Fri Oct 31, 2008 12:09 am
by Lama
I want to reverse the ranking order of some ordinal variables (some are 5 Likert-scales, some are 10 Likert-scales). To achieve this I recoded the values one after another, and it seems to work, though its quite awkward. Is there an easier solution for my problem?
Example (5-Likert):
c008 = @recode (c008=5, 11, c008)
c008 = @recode (c008=4,12, c008)
c008 = @recode (c008=2, 4, c008)
c008 = @recode (c008=1, 5, c008)
c008 = @recode (c008=11, 1, c008)
c008 = @recode (c008=12, 2,C008)
Gratefully yours
Lama
Re: Reverse order of ordinally scaled variables
Posted: Fri Oct 31, 2008 8:23 am
by EViews Gareth
If the number of elements in the scale is random, and the ordering is somewhat random (as appears to be the case from your example), then I'm not sure there is an easy solution.
Re: Reverse order of ordinally scaled variables
Posted: Fri Oct 31, 2008 10:06 am
by startz
I want to reverse the ranking order of some ordinal variables (some are 5 Likert-scales, some are 10 Likert-scales). To achieve this I recoded the values one after another, and it seems to work, though its quite awkward. Is there an easier solution for my problem?
Example (5-Likert):
c008 = @recode (c008=5, 11, c008)
c008 = @recode (c008=4,12, c008)
c008 = @recode (c008=2, 4, c008)
c008 = @recode (c008=1, 5, c008)
c008 = @recode (c008=11, 1, c008)
c008 = @recode (c008=12, 2,C008)
Gratefully yours
Lama
It's worse than you think. The code above may not do what you want. Suppose c008 equals 5. The first line recodes it to 11. Then the fifth line recodes it to 1!
Re: Reverse order of ordinally scaled variables
Posted: Fri Oct 31, 2008 2:59 pm
by EViews Glenn
I want to reverse the ranking order of some ordinal variables (some are 5 Likert-scales, some are 10 Likert-scales). To achieve this I recoded the values one after another, and it seems to work, though its quite awkward. Is there an easier solution for my problem?
Assuming that the scaling goes from 1-5 and 1-10 and that you merely want to reverse the order, I think that the easiest way is to offset the original series and then change signs.
Code: Select all
series c008r = -(c008-@max(c008)-1)
Having said that, the example code provided above doesn't seem to be a mere reversal of the scores. Can you be more specific about how you want the recoding to work?
Re: Reverse order of ordinally scaled variables
Posted: Sun Nov 09, 2008 10:59 am
by Lama
Thank yor for your help!
I'm working with data from the World Values Survey. As in this questionaire for some response items the highest numerical value corresponds to the highest value of the latent variable and for them items it is the other way round I try to reverse the order of some response items so that in the end all items I want to analyze are "Highest numerical value = Highest value of latent variable".
E. G.:
Importance of Religion in your Life
1= very important
2
3
4 = not at all important
Here my aim is to have "1" correspond to "not at all important" etc.
Gratefully yours!
Re: Reverse order of ordinally scaled variables
Posted: Sun Nov 09, 2008 12:51 pm
by EViews Gareth
If all you want to do is reverse the scoring, then you can do as Glenn said - just do (Max_value + 1) - value. Thus in your example you would do (4+1)-values, which would give:
5-1 = 4
5-2 = 3
5-3 = 2
5-4 = 1
i.e. 1 gets transformed into 4, 2 gets transformed into 3, 3 gets transformed into 2, 4 gets transformed into 1...
Re: Reverse order of ordinally scaled variables
Posted: Wed Nov 12, 2008 6:30 am
by Lama
Yeah, thanks Glenn, thanks Gareth!
Once again you really helped me. It works fine and the idea of not overwriting the data but storing it in another variable clearly helps to avoid messing up the data..
Re: Reverse order of ordinally scaled variables
Posted: Wed Nov 12, 2008 5:00 pm
by EViews Gareth
You don't technically need to create a new variable, of course. You could always do:
Re: Reverse order of ordinally scaled variables
Posted: Thu Nov 13, 2008 8:00 am
by Lama
Yes, you are right. In my case it's definitely better to create a new variable, e.g. if for one reason or another I have to analyze the "original" data later on.