On Tue, 17 Sep 2019, Sven Schreiber wrote:
Am 17.09.2019 um 09:47 schrieb Riccardo (Jack) Lucchetti:
>
> matrix sel = ranking(muniform(n,1))
> return X[sel[1:k],]
>
the doc for ranking says "...plus one half the number of elements...",
so it can be non-integer, no?
In theory, yes. But the odds of having a tie among pseudo-random uniforms
are so small I wouldn't worry about it.
-------------------------------------------------------
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
-------------------------------------------------------