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
Reverse order of ordinally scaled variables
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13401
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Reverse order of ordinally scaled variables
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.
Follow us on Twitter @IHSEViews
-
- Non-normality and collinearity are NOT problems!
- Posts: 3779
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Reverse order of ordinally scaled variables
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!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
-
- EViews Developer
- Posts: 2676
- Joined: Wed Oct 15, 2008 9:17 am
Re: Reverse order of ordinally scaled variables
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.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?
Code: Select all
series c008r = -(c008-@max(c008)-1)
Re: Reverse order of ordinally scaled variables
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!
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!
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13401
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Reverse order of ordinally scaled variables
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...
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...
Follow us on Twitter @IHSEViews
Re: Reverse order of ordinally scaled variables
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..
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..
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13401
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Reverse order of ordinally scaled variables
You don't technically need to create a new variable, of course. You could always do:
Code: Select all
c008 = @max(c008)+1 - c008
Follow us on Twitter @IHSEViews
Re: Reverse order of ordinally scaled variables
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.
Who is online
Users browsing this forum: No registered users and 2 guests