![]() Chapter Contents |
![]() Previous |
![]() Next |
| RANUNI |
| Category: | Random Number |
| Tip: | If you want to change the seed value during execution, you must use the CALL RANUNI routine instead of the RANUNI function. |
| Syntax | |
| Arguments | |
| Details | |
| Comparisons | |
| See Also |
Syntax |
| RANUNI(seed) |
| Range: | seed < 231-1 |
| Note: | If seed
0, the time of day is used to initialize the seed stream. |
| Details |
The RANUNI function returns a number that is generated from the uniform distribution on the interval (0,1) using a prime modulus multiplicative generator with modulus 231- and multiplier 397204094 (Fishman and Moore 1982) (See References).
You can use a multiplier to change the length of the interval and an added constant to move the interval. For example,
random_variate=a*ranuni(seed)+b;returns a number that is generated from the uniform distribution on the interval (b,a+b).
| Comparisons |
| See Also |
Call routine:
| CALL RANUNI |
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.