### @colpctiles Not Working...

Posted:

**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!

KC

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!

KC