pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Samples between PSPP and SPSS


From: John Darrington
Subject: Re: Samples between PSPP and SPSS
Date: Wed, 21 Sep 2011 18:29:01 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

In SPSS, you can choose between the MC rng and the Mersenne Twister
using the commands:

SET RNG=MC.

or 

SET RNG=MT.


See the SPSS documentation for details.


PSPP doesn't implement this.  (Perhaps we should?)  Like Jason says, we always 
use the
Mersenne Twister.

I also notice that the SPSS docs say that the default seed is 2000000 whereas 
we set it
from the realtime clock.

I'd be interested to see some of your experiements to see what is necessary to 
make them
match (if it's at all possible).  It would also be interesting to see how the 
random 
number distributions fare when analysed with some of the non-parametric tests.

J'



On Wed, Sep 21, 2011 at 12:50:47PM -0400, Jason Stover wrote:
     On Wed, Sep 21, 2011 at 10:12:39AM -0400, Andy Choens wrote:
     > If I set a set to a consitent value, say 123, and create a sample in 
PSPP will it match the sample created by SPSS? 
     
     I doubt it, but can't be sure becaus the source code to SPSS is kept
     secret.
     
     > If someone 
     > knows which pseudo number generator is being used by PSPP and SPSS 
respectively that would also be a big help so I could 
     > replicate / confirm output indpenedently.
     
     As of about 10 years ago, most of SPSS used a multiplicative
     congruential random number generator. It had a period of either 2^31 -
     1 or 2^32 - 1. They may still use such a generator, since changing it
     would cause users' old syntax to give different answers.
     
     PSPP uses the Mersenne Twister, which has a period of 2^19937 - 1, as
     implemented in GSL. You can see the code for it in src/math/random.c.
     
     -Jason
     
     _______________________________________________
     Pspp-users mailing list
     address@hidden
     https://lists.gnu.org/mailman/listinfo/pspp-users

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]