Kehl Dániel schrieb:
Dear Sven,
thanks for your help. In fact, I want to generate n (eg. 10000)
random numbers of some kind (stnormal, normal with other parameters
and other distributions too) and want to check the effects of
rounding of the 10000 numbers on the main descriptive statistics (in
the first step). Of course I want to do that several times, to see
how stable the difference between the desc. stats are. I can plot the
distribution of the differences caused by the rounding.
Is the inner loop still waste of time in this study?
The point is that to generate n random numbers you just have to create a
new (empty) datafile with a sample size of 10000, and then you call
normal() just once, like so (more or less):
nulldata 10000
u=normal()
u2=round(u)
u will be a series with 10000 independent random numbers, and u2 will
hold your transformed series.
or you could do it with matrices instead of series, which would like
approx. like this:
matrix mu = mnormal(10000,1)
matrix mu2 = round(mu) # not sure if this works
But if you haven't worked with gretl matrices before, you probably
should stick to the series-based approach
your outer loop looked perfectly fine
good luck,
sven