Class | Algebraic operators and function |
Name | rand | rnorm |
Arguments |
Produce a random value from U(0..1) or N(0,1). That is, a double precision number from the uniform distribution between 0 and 1, or from the Normal distribution with mean 0 and variance 1.
Example:
>> clear >> set seeds 123 5432 1245 Seeds for RNG (AS183)= 123 5432 1245 >> { rand rand rand } => 0.5027132034301758 => 0.8120918273925781 => 0.7080494165420532 >> sim ped 100 1 1 1 >> run >> set loc v1 qua >> v1=rnorm >> his v1 ------------------------------------------------ Mixture distributions for trait "v1" ------------------------------------------------ Intvl Midpt Count Histogram ------------------------------------------------------- -2.3557 3 *** -2.1053 2 ** -1.8549 4 **** -1.6472 1 * -1.3541 7 ******* -1.1037 2 ** -0.8533 5 ***** -0.6029 13 | ************* -0.3525 9 | ********* -0.1020 9 + ********* 0.1484 18 | ****************** 0.3988 4 | **** 0.6492 6 ****** 0.8996 5 ***** 1.1500 6 ****** 1.4004 2 ** 1.6508 2 ** 1.9012 0 2.1516 0 2.4073 1 * 2.6524 0 2.7777 1 * [...]
<< (function) | Up to index | >> (istyp) |