The UNIFORM function generates a pseudorandom numbers from the uniform distribution on . The seed argument is a numeric matrix or literal. The elements of the seed argument can be any integer value up to .
This function is deprecated. Instead, you should use the RANDGEN subroutine to generate random values. The RANDGEN subroutine has excellent statistical properties and is preferred when you need to generate millions of random numbers.
The UNIFORM function returns a matrix with the same dimensions as the argument. The first argument on the first call is used for the seed, or if that argument is 0, the system clock is used for the seed. The function is equivalent to the DATA step function RANUNI.
The following statements produce the output that is shown in FigureĀ 24.416:
seed = 123456; c = j(10, 1, seed); /* generate 10 numbers from the same seed */ b = uniform(c); print b;