Random Number Generators

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Random Number Generators

Rajeshms
Hi All,

I kindly request all to make me understand the use of option Random number generators under the menu transform.

thanks in advance.

--
Rajesh M S



Reply | Threaded
Open this post in threaded view
|

Re: Random Number Generators

Albert-Jan Roskam
>
>Hi All,
>
>
>I kindly request all to make me understand the use of option Random number generators under the menu transform.
>

Hi,

these are various (I believe two) algorithms that ensure that the result of the various random functions (UNIFORM, RV.NORMAL, etc etc.) can be replicated. Most often, though, I use it with the SAMPLE command. Assuming you have some data set open:
SET MTINDEX = 4312 RNG = MT.
SAMPLE .10.
The first line ensures that your sample (smaller part of the dataset used to e.g. speed up debugging) always contains the same values. MT stands for Mersenne Twister, which is a better algorithm than the standard pseudo random number generator, which can be used by using SET SEED, but has better backward compatibility. If you don't use SET MTINDEX or SET SEED, Spss picks its own random number seed, which --I think-- is based on the computer time.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD