Thanks Riccardo, this works.
On Sun, 27 Nov 2011, Carlos Andrade wrote:There are several ways, but the main difference is: with repetiton or not? Have a look at this:
Gretl List
How to generate a random variable for a given range of values?
Example: 46 observations between 0 and 45.
<hansl>
nulldata 46
#with repetition
series x = floor(uniform(0,46))
#without repetition
matrix tmp = muniform(46,1) ~ seq(0,45)'
series z = msortby(tmp,1)[,2]
</hansl>
Hope this helps,
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti@univpm.it
http://www.econ.univpm.it/lucchetti
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users