Returns a random variate from a Cauchy distribution.
Category: | Random Number |
is the seed value. A new value for seed is returned each time CALL RANCAU 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 for more information about seed values |
is a numeric SAS variable. A new value for the random variate x is returned each time CALL RANCAU is executed.
data case; retain Seed_1 Seed_2 Seed_3 45; do i=1 to 10; call rancau(Seed_1,X1); call rancau(Seed_2,X2); X3=rancau(Seed_3); if i=5 then do; Seed_2=18; Seed_3=18; end; output; end; run; proc print; id i; var Seed_1-Seed_3 X1-X3; run;
data u1(keep=x); seed = 104; do i = 1 to 5; call rancau(seed, X); output; end; call symputx('seed', seed); run; data u2(keep=x); seed = &seed; do i = 1 to 5; call rancau(seed, X); output; end; run; data all; set u1 u2; z = rancau(104); run; proc print label; label x = 'Separate Streams' z = 'Single Stream'; run;