Stata 15 help for rnormal()

[FN] Random-number functions

Function

rnormal() Description: standard normal (Gaussian) random variates, that is, variates from a normal distribution with a mean of 0 and a standard deviation of 1 Range: c(mindouble) to c(maxdouble)

rnormal(m) Description: normal(m,1) (Gaussian) random variates, where m is the mean and the standard deviation is 1 Domain m: c(mindouble) to c(maxdouble) Range: c(mindouble) to c(maxdouble)

rnormal(m, s) Description: normal(m,s) (Gaussian) random variates, where m is the mean and s is the standard deviation

The methods for generating normal (Gaussian) random variates are taken from Knuth (1998, 122-128); Marsaglia, MacLaren, and Bray (1964); and Walker (1977). Domain m: c(mindouble) to c(maxdouble) Domain s: 0 to c(maxdouble) Range: c(mindouble) to c(maxdouble)

References

Knuth, D. 1998. The Art of Computer Programming, Volume 2: Seminumerical Algorithms. 3rd ed. Reading, MA: Addison Wesley.

Marsaglia, G., M. D. MacLaren, and T. A. Bray. 1964. A fast procedure for generating normal random variables. Communications of the ACM 7: 4-10.

Walker, A. J. 1977. An efficient method for generating discrete random variables with general distributions. ACM Transactions on Mathematical Software 3: 253-256.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index