Language Reference |
generates a pseudo-random normal deviate
where seed is a numeric matrix or literal. The seed argument can be any integer value up to .
The NORMAL function is a scalar function that returns a pseudo-random number having a normal distribution with a mean of 0 and a standard deviation of 1. The NORMAL function returns a matrix with the same dimensions as the argument. The first argument on the first call is used for the seed (or if that is 0, the system clock is used for the seed). This function is synonymous with the DATA step function RANNOR. The Box-Muller transformation of the UNIFORM function deviates is used to generate the numbers. The following code produces the output vector , as shown:
seed = 123456; c = j(10,1,seed); b = normal(c); print b; B -0.109483 -0.348785 1.1202546 -2.513766 1.3630022
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.