calculate ranks of series

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

lomfy
Posts: 36
Joined: Mon Jul 18, 2011 11:51 pm

calculate ranks of series

Postby lomfy » Sun Jul 31, 2011 10:37 am

hello!
is there a possibility to calculate the ranks of the items of a series automatically?

for instance, if i have the series:

rs1
+4
+2
-3
-1
+6
-8

and would like to rank the series items' absolute values...

abs(rs1)
+4
+2
+3
+1
+6
+8

according to their size...

rank(abs(rs1))
4
2
3
1
5
6

...how could i possibly do this? thank you for any ideas!

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

Re: calculate ranks of series

Postby startz » Sun Jul 31, 2011 12:19 pm

Code: Select all

@ranks(abs(r1))

lomfy
Posts: 36
Joined: Mon Jul 18, 2011 11:51 pm

Re: calculate ranks of series

Postby lomfy » Sun Jul 31, 2011 1:04 pm

perfect! thanks!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests