Apologies for the bombardment.
The following has substance for discrete random variables and samples
with many ties.
The Gretl function "ranking" does the following:
<<
ranking
Output: same type as input
Argument: y (series or vector)
Returns a series or vector with the ranks of y. The rank for observation
i is the number of elements that are less than y_i plus one half the
number of elements that are equal to yi.
>
The function performs as stated in Help. To my understanding the above
is consistent with the concept of the "mid-Distribution Function"
introduced I think by Em. Parzen and associates. If we take the
resulting series and divide by sample size, we get a series where we
assign an empirical probability to each observation i. But these are
probabilities consistent with the empirical mid-distribution function.
But, there is not a Gretl function like, say,
<<
rankingalt
Output: same type as input
Argument: y (series or vector)
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.
See also ranking.
>
So while using the "ecdf" Gretl function we get the unique values of the
empirical distribution function (as if it internally uses the
non-existent function "rankingalt"), if one wants to obtain a series
having the length of the sample, where at each observation i a
probability is assigned that is consistent with the empirical
distribution function (and not the empirical mid-distribution function),
one cannot achieve that, at least not in one obvious stroke.
It is not clear whether the empirical mid-distribution function is the
suitable tool to be used in all cases (my case relates to mixed
Copulas), so I was wondering whether Gretl could acquire a function like
"rankingalt" above.
Thanks.
--
Alecos Papadopoulos PhD
Athens University of Economics and Business
web:
alecospapadopoulos.wordpress.com/