@colpctiles Not Working...

For questions regarding programming in the EViews programming language.

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

Posts: 89
Joined: Wed Mar 04, 2015 11:46 am

@colpctiles Not Working...

Postby kcaron » Sun Nov 19, 2023 2:46 pm

I'm having issues using @colpctiles to get percentile values for each column of a matrix.

The online help says @colpctiles(m[, o]) will return a matrix with percentile values of each column in a matrix.
The "o" should control ascending ("a") or descending ("d").

The matrix for which I'm trying to percentile rank the columns is called "matrix_raw" (attached).
I'm trying to output a "matrix_hilo" (ranking high to low) and another called "matrix_lohi" (ranking the other way).
However, EViews only will rank one way, regardless of which direction option I choose.

Am I doing something wrong?
matrix matrix_hilo = @colpctiles(matrix_raw,"d") 'Sort the data descending
matrix matrix_lohi = @colpctiles(matrix_raw,"a") 'Sort the data ascending

I'm using EViews 13

Many thanks!

(62.03 KiB) Downloaded 56 times

EViews Matt
EViews Developer
Posts: 563
Joined: Thu Apr 25, 2013 7:48 pm

Re: @colpctiles Not Working...

Postby EViews Matt » Mon Nov 20, 2023 2:34 pm


You're correct, the rank 'direction' argument is being incorrectly ignored. We'll fix that in an upcoming patch.

Posts: 89
Joined: Wed Mar 04, 2015 11:46 am

Re: @colpctiles Not Working...

Postby kcaron » Tue Nov 21, 2023 10:57 am

Thank you!!

Return to “Programming”

Who is online

Users browsing this forum: Baidu [Spider] and 9 guests