Functions and CALL Routines |
Returns a random variate from a Cauchy distribution.
Category: |
Random Number
|
Tip: |
If you want to change the seed value during execution,
you must use the CALL RANCAU routine instead of the RANCAU function.
|
-
seed
-
is a numeric constant, variable, or expression
with an integer value. If seed 0, the time of day is used
to initialize the seed stream.
Range: |
seed <
231 -1 |
See: |
Seed Values for more information about seed
values |
The RANCAU function returns a variate
that is generated from a Cauchy distribution with location parameter 0 and
scale parameter 1. An acceptance-rejection procedure applied to RANUNI uniform
variates is used. If u and v are independent uniform
(-1/2, 1/2) variables and
, then u/v is a Cauchy variate.
A Cauchy variate X with location parameter ALPHA and scale parameter BETA
can be generated:
x=alpha+beta*rancau(seed);
For a discussion about seeds and streams of data, as well as examples
of using the random-number functions, see Generating Multiple Variables from One Seed in Random-Number Functions.
The CALL RANCAU routine, an alternative
to the RANCAU function, gives greater control of the seed and random number
streams.
|
Functions and CALL routines:
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.