Cross-sectional ranks

For questions regarding programming in the EViews programming language.

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

tgoodwin
Posts: 13
Joined: Fri Oct 23, 2009 1:58 pm

Cross-sectional ranks

Postby tgoodwin » Wed Sep 08, 2010 11:32 am

I have a pool of time series. I want to create a new set of the series where each observation is the cross-sectional rank (at a point in time) across the pool. How do I do this in e-views? Do I have to use matrix operations? Thanks, Tom

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

Re: Cross-sectional ranks

Postby EViews Gareth » Wed Sep 08, 2010 11:44 am

Put them into a group, convert the group into a matrix (@convert), then use the @colranks function to compute the rankings (probably on the transpose). Something like this:

Code: Select all

matrix data = @convert(mygroup) matrix ranks = @colranks(@transpose(data))
You'll then have to convert the ranks matrix back into a group (mtos)

tgoodwin
Posts: 13
Joined: Fri Oct 23, 2009 1:58 pm

Re: Cross-sectional ranks

Postby tgoodwin » Wed Sep 08, 2010 12:58 pm

Thanks Gareth. :)

tgoodwin
Posts: 13
Joined: Fri Oct 23, 2009 1:58 pm

Re: Cross-sectional ranks

Postby tgoodwin » Wed Sep 08, 2010 7:27 pm

I spoke too soon. When I use @colranks() I get an Error 500 message. And I can't find this function anywhere in the eviews 7 documentation. Is this a discontinued function?

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

Re: Cross-sectional ranks

Postby EViews Gareth » Wed Sep 08, 2010 7:33 pm

make sure your copy of EViews 7 is up to date.

tgoodwin
Posts: 13
Joined: Fri Oct 23, 2009 1:58 pm

Re: Cross-sectional ranks

Postby tgoodwin » Thu Sep 09, 2010 10:16 am

I downloaded an ev7 update and now @colranks works, but there still is nothing in the documentation about it. Is there a @rowranks as well?

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

Re: Cross-sectional ranks

Postby EViews Gareth » Thu Sep 09, 2010 10:30 am

They're sort of hidden functions at the moment (they were added after the release of EViews 7, hence the no-documentation). Rowranks is not yet implemented, which is why you need to use colranks with a transpose. I'll see if I can get rowranks working before the next patch though.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests