On Sun, 22 Sep 2019, Alecos Papadopoulos wrote:
Sorry Jack, yes I tried it, something obvious must be slightly wrong
because
your function misplaced the results, but I understood the logic, simplified
it to
<hansl>
function series rankingalt(series G)
matrix a = aggregate(const, G)
matrix b = cum(a[,2])
return replace(G, a[,1], b)
end function
</hansl>
and it works just fine.
Thanks!
Your change replaces "less than" with "less than or equal". :)
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------