dlnorm(x, meanlog=0, sdlog=1, log=F) plnorm(q, meanlog=0, sdlog=1) qlnorm(p, meanlog=0, sdlog=1) rlnorm(n, meanlog=0, sdlog=1, bigdata=F)
bdVector
of (positive) quantiles.
Missing values (
NA
s) are allowed.
bdVector
of (positive) quantiles.
Missing values (
NA
s) are allowed.
bdVector
of probabilities.
Missing values (
NA
s) are allowed.
length(n)
is larger than 1, then
length(n)
random values are returned.
bdVector
s 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
.
TRUE
, an object of type
bdVector
is returned.
Otherwise, a
vector
object is returned. This argument can be used only if the bigdata library section has been loaded.
TRUE
,
dlnorm
will return
the log of the density, not the density itself.
dlnorm
),
probability (
plnorm
),
quantile (
qlnorm
), or
random sample (
rlnorm
)
for the log-normal distribution with parameters
meanlog
and
sdlog
.
rlnorm
causes creation of the dataset
.Random.seed
if it does
not already exist, otherwise its value is updated.
Elements of
q
or
p
that are missing will cause the corresponding
elements of the result to be missing.
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.)
For details on the uniform random number generator implemented in S-PLUS,
see the
set.seed
help file.
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.
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")