Reverse order of ordinally scaled variables

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Jason, EViews Moderator, EViews Pamela

Lama
Posts: 15
Joined: Tue Oct 28, 2008 12:07 am

Reverse order of ordinally scaled variables

Postby Lama » Fri Oct 31, 2008 12:09 am

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 Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11369
Joined: Tue Sep 16, 2008 5:38 pm

Re: Reverse order of ordinally scaled variables

Postby EViews Gareth » Fri Oct 31, 2008 8:23 am

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

startz
Non-normality and collinearity are NOT problems!
Posts: 3173
Joined: Wed Sep 17, 2008 2:25 pm

Re: Reverse order of ordinally scaled variables

Postby startz » Fri Oct 31, 2008 10:06 am

Lama wrote: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!

EViews Glenn
EViews Developer
Posts: 2551
Joined: Wed Oct 15, 2008 9:17 am

Re: Reverse order of ordinally scaled variables

Postby EViews Glenn » Fri Oct 31, 2008 2:59 pm

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?

Lama
Posts: 15
Joined: Tue Oct 28, 2008 12:07 am

Re: Reverse order of ordinally scaled variables

Postby Lama » Sun Nov 09, 2008 10:59 am

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!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11369
Joined: Tue Sep 16, 2008 5:38 pm

Re: Reverse order of ordinally scaled variables

Postby EViews Gareth » Sun Nov 09, 2008 12:51 pm

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...
Follow us on Twitter @IHSEViews

Lama
Posts: 15
Joined: Tue Oct 28, 2008 12:07 am

Re: Reverse order of ordinally scaled variables

Postby Lama » Wed Nov 12, 2008 6:30 am

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..

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11369
Joined: Tue Sep 16, 2008 5:38 pm

Re: Reverse order of ordinally scaled variables

Postby EViews Gareth » Wed Nov 12, 2008 5:00 pm

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

Lama
Posts: 15
Joined: Tue Oct 28, 2008 12:07 am

Re: Reverse order of ordinally scaled variables

Postby Lama » Thu Nov 13, 2008 8:00 am

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.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 5 guests