[Gretl-users] New rank function for genr
Riccardo (Jack) Lucchetti
r.lucchetti at univpm.it
Tue May 22 12:02:33 EDT 2007
On Tue, 22 May 2007, andreas.karlsson at ltv.se wrote:
> r.lucchetti at univpm.it @ INTERNET skrev 2007-05-22 16:10:30 :
>
> [snip]
>
>> ceiling() whould be easy to do. However, with a bit of dexterity you can
>> coerce the "int" function to do what you want; for example:
>>
>> nulldata 100
>>
>> x = int(uniform()*6)/2
>> f = int(x)
>> c = (x-f) ? f+1 : f
>
>
> It surely would be easier to use genr y = ceiling(x)
>
Agreed.
>
>> As for "mode()", I'm all for it, provided we find a sensible way to
> handle
>> multi-modal variables.
>
>
> Also, when we are discussing new functions, a "rank()" function for the
> "genr" command, that gives the ranks of the values in a vector, with ties
> resulting in ranks being averaged, would be useful.
Doh!
I realise now that you want the mode, not the corresponding observation.
How stupid of me. Sorry.
Yes, both the mode() function and the rank() function are very much
doable. Allin and I will meet next week and we'll see to it.
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti at univpm.it
http://www.econ.univpm.it/lucchetti
More information about the Gretl-users
mailing list