how to rank a matrix from one of its vector?

For questions regarding programming in the EViews programming language.

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

Gibus
Posts: 9
Joined: Tue Dec 07, 2010 2:57 am

how to rank a matrix from one of its vector?

Postby Gibus » Fri Dec 31, 2010 5:58 am

I am eviws7 user

When using bellow code

'sort the matrix by descending order
vector vcorabsranked =@ranks(@columnextract(matcorprob,1),"d")
matrix matcorprobranked = @rapplyranks(matcorprob, vcorabsranked)

on folowing matrix named "matcorprob"

1.000000 NA 1.000000
0.313050 0.378459 1.000000
0.661396 0.037280 2.000000
0.461909 0.178963 4.000000

I receive error message: "matrix size error-idex is worng size in etc..", why?

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

Re: how to rank a matrix from one of its vector?

Postby EViews Gareth » Fri Dec 31, 2010 9:07 am

to use @rapplyranks you'd need a vector of size 3, not 4. Perhaps you should be using @capplyranks.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests