Re: random number functions under TEMPORARY

Posted by Kirill Orlov on
URL: http://spssx-discussion.165.s1.nabble.com/random-number-functions-under-TEMPORARY-tp5740354p5740358.html

Maybe somebody from SPSS (besides Jon) will come to explain why it is so? The issue is interesting and quite important.


28.03.2021 20:23, Jon Peck пишет:
I don't know why the TEMPORARY sequence is different - maybe TEMPORARY is grabbing some random numbers from the generator - but I would recommend that you use the MT generator rather than MC as it has better randomization properties.  You can set the seed for that, but you cannot show the state, because the state is 64K long.

On Sun, Mar 28, 2021 at 6:58 AM Kirill Orlov <[hidden email]> wrote:
I wonder what mechanics makes random number functions to produce
different result under TEMPORARY.
Compare:

set rng= mc seed= 494676727.
compute x= uniform(1).
print /x.
execute.
echo '----'.

set rng= mc seed= 494676727.
temporary.
compute x= uniform(1).
print /x.
execute.
echo '----'.


      .66
      .76
----
      .10
      .42
----

===================== 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