Ranking

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

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

ylongchamp
Posts: 14
Joined: Fri Apr 08, 2011 5:03 am

Ranking

Postby ylongchamp » Wed Feb 08, 2012 5:48 am

Hi,

Imagine you have a matrix long the sample size and large the number of sectors in the S&P 500 that contains scores, summarizing the relative attractiveness of sectors. How can I generate another matrix that ranks these scores? To put it differently, I am looking for a function similar to "rank()" in Excel.

Thanks for your help!

Yves

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

Re: Ranking

Postby EViews Gareth » Wed Feb 08, 2012 8:41 am

Not quite sure what you're asking, but probably either the @ranks() function or the @colranks() function.

ylongchamp
Posts: 14
Joined: Fri Apr 08, 2011 5:03 am

Re: Ranking

Postby ylongchamp » Wed Feb 08, 2012 9:59 am

@ranks() does not do exaclty what I want. But @colranks() could potentially do that... as long as you explain me how it works and what it does. This function is not described in the help section!

I am looking for a function like @cimax(m1) that returns the index, not the value.
Last edited by ylongchamp on Wed Feb 08, 2012 10:08 am, edited 1 time in total.

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

Re: Ranking

Postby EViews Gareth » Wed Feb 08, 2012 10:06 am

It creates a new matrix containing the ranks of each element of the first matrix, but based on column. There is an @rowranks too that does the same thing by rows.

ylongchamp
Posts: 14
Joined: Fri Apr 08, 2011 5:03 am

Re: Ranking

Postby ylongchamp » Thu Feb 09, 2012 12:10 am

It is probably the right function, but I still don't know how to use it. Does it work with Eviews 6?

What is the syntax? m2 = @colranks(m1) or @colranks(m1, m2) and what are the options?
m2 = @ranks(m1) works but neither @colranks nor @rowranks seem to follow this syntax.

Why is this function not described in the online help? Are there other functions like this one that are not in the online help?

Thank you Gareth for your help!
Yves

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

Re: Ranking

Postby EViews Gareth » Thu Feb 09, 2012 8:41 am

@colranks is not in EViews 6.

It is in EViews 7, but was added after the documentation was written.

ylongchamp
Posts: 14
Joined: Fri Apr 08, 2011 5:03 am

Re: Ranking

Postby ylongchamp » Fri Feb 10, 2012 12:20 am

ok, thanks.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests