Returns a random variate from a tabled probability distribution.
Category: | Random Number |
is the seed value. A new value for seed is returned each time CALL RANTBL is executed.
Range | seed < 231 - 1 |
Note | If seed ≤ 0, the time of day is used to initialize the seed stream. |
See | Seed Values and Comparison of Seed Values in Random-Number Functions and CALL Routines |
is a numeric SAS value.
Range | 0 ≤ pi ≤ 1 for 0 < i ≤ n |
is a numeric SAS variable. A new value for the random variate x is returned each time CALL RANTBL is executed.
data u1(keep=x); seed = 104; do i = 1 to 5; call rantbl(seed, .02, x); output; end; call symputx('seed', seed); run; data u2(keep=x); seed = &seed; do i = 1 to 5; call rantbl(seed, .02, x); output; end; run; data all; set u1 u2; z = rantbl(104, .02); run; proc print label; label x = 'Separate Streams' z = 'Single Stream'; run;