Random Number Transforms

Random number transforms can be used with or without a specified seed. Loading a dataset, and several other transform operations, cause the dataset's Transform List to be applied to the Before Transforms values of the raw variables. Every time an unseeded random number transform is applied it is recalculated, and thus generates a different random sequence. The starting point or “seed” is taken from the system clock.
The seeded random number functions force the seed to a specified value. If the seed argument ? 0, a system constant is used as the seed; if the argument is any positive integer that input value is used as the seed. When you apply a seeded transform, it affects all $rand and $random sequences until you apply another seeded transform or exit the program, even if you insert them in the Transform List above the seeded transform, and even if you delete it after it has been applied.
rand (No arguments.)
: At each row, generates a random real number between 0.0 and 1.0.
random([a,]b)
: At each row, generates a random whole number inclusively between arguments a and b. If a is omitted, it defaults to be 1. a must be less than b. Move
randomS(seed,[a,]b)
: At each row, generates a seeded random whole number inclusively between arguments a and b. The seed is any positive integer. If a is omitted, it is assumed to be 1. a must be less than b.
randS(seed)
: At each row, generates a seeded random real number between 0.0 and 1.0. The seed is any positive integer
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.