[Jack] you mean, something like this?
<hansl>
function series rankingalt(series x)
matrix a = aggregate(const, x)
return replace(x, a[,1], cum(0 | a[1:rows(a)-1,2]))
end function
</hansl>
AP: To the extend I understand the code, I don't think so. I want a series that has
the length of the sample, exactly as the "ranking" function gives.
The only difference between the "ranking" function and the
"rankingalt" function is that the "rankingalt" function
<<Returns a series or vector with the ranks of y. The rank for observation
i here is the number of elements that are less or equal than y_i.>>
Namely we do not subtract half of ties, as we do in the "ranking" function.
I didn't suggest to replace the ranking function, just asked if we could have also the
"rankingalt" function.
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web:
alecospapadopoulos.wordpress.com/
cell:+30-6945-378680
skype:alecos.papadopoulos