LOGNORMALPARMS Function |
%LogNormalParms(mean,sd) returns a 2-vector with the parameters for the underlying Normal to achieve the given mean and standard deviation for a log normal. The mean has to be positive.
Example
(The SOURCE needs to be done once)
source lognormalparms.src
compute lnparms=%LogNormalParms(2.0,1.0)
set ln 1 1000 = exp(lnparms(1)+%ran(lnparms(2)))
stats ln
draws a series of 1000 independent log normals where the log normal distribution has mean 2.0 and standard deviation 1.0.
Copyright © 2025 Thomas A. Doan