Lognormal Distribution

DESCRIPTION:
Density, cumulative probability, quantiles and random generation for the lognormal distribution.

USAGE:
dlnorm(x, meanlog=0, sdlog=1)
plnorm(q, meanlog=0, sdlog=1)
qlnorm(p, meanlog=0, sdlog=1)
rlnorm(n, meanlog=0, sdlog=1)

REQUIRED ARGUMENTS:
x:
vector of (positive) quantiles. Missing values (NAs) are allowed.
q:
vector of (positive) quantiles. Missing values (NAs) are allowed.
p:
vector of probabilities. Missing values (NAs) are allowed.
n:
sample size. If length(n) is larger than 1, then length(n) random values are returned.

OPTIONAL ARGUMENTS:
meanlog:
sdlog:
vectors of means and standard deviations of the distribution of the log of the random variable. Thus, exp(meanlog) is a scale parameter and sdlog is a shape parameter for the lognormal distribution. These are replicated to be the same length as p or q or the number of deviates generated. Missing values are not accepted except in dlnorm.

VALUE:
density (dlnorm), probability (plnorm), quantile (qlnorm), or random sample (rlnorm) for the log-normal distribution with parameters meanlog and sdlog.

SIDE EFFECTS:
The function rlnorm causes creation of the dataset .Random.seed if it does not already exist, otherwise its value is updated.

DETAILS:
Elements of q or p that are missing will cause the corresponding elements of the result to be missing.

BACKGROUND:
The lognormal distribution takes values on the positive real line. If the logarithm of a lognormal deviate is taken, the result is a Gaussian (normal) deviate, hence the name. Applications for the lognormal include the distribution of particle sizes in aggregates, flood flows, concentrations of air contaminants, and failure time. (The hazard function of the lognormal is increasing for small values and then decreasing; a mixture of heterogeneous items which individually have monotone hazards can create such a hazard function.)

REFERENCES:
Johnson, N. L. and Kotz, S. (1970). Continuous Univariate Distributions, vol. 1. Houghton-Mifflin, Boston.

Lognormal Distribution. In Encyclopedia of Statistical Sciences. S. Kotz and N. L. Johnson, eds.


SEE ALSO:
set.seed , Normal .

EXAMPLES:
log(rlnorm(50)) #hard way to generate a sample of normals

xx <- seq(0, 6, length=200) plot(xx, dlnorm(xx), type="l") lines(xx, dlnorm(xx, meanlog=1), lty=2) lines(xx, dlnorm(xx, sdlog=3), lty=3) legend(3, .6, c("meanlog 0, sdlog 1", "meanlog 1, sdlog 1", "meanlog 0, sdlog 3"), lty=1:3) title(main="Lognormal Densities")