Chapter Contents |
Previous |
Next |
RANTRI |
Category: | Random Number |
Tip: | If you want to change the seed value during execution, you must use the CALL RANTRI routine instead of the RANTRI function. |
Syntax | |
Arguments | |
Details | |
Comparisons | |
See Also |
Syntax |
RANTRI(seed,h) |
Range: | seed < 231-1 |
Note: | If seed 0, the time of day is used to initialize the seed stream. |
range: | 0 < h < 1 |
Details |
The RANTRI function returns a variate that is generated from the triangular distribution on the interval (0,1) with parameter h, which is the modal value of the distribution. An inverse transform method applied to a RANUNI uniform variate is used.
A triangular distribution X on the interval [A,B] with mode C, where A C B, can be generated:
x=(b-a)*rantri(seed,(c-a)/(b-a))+a;
Comparisons |
See Also |
Call routine:
CALL RANTRI |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.