udlnorm function

UNU.RAN object for Log Normal distribution

UNU.RAN object for Log Normal distribution

Create UNU.RAN object for a Log Normal distribution whose logarithm has mean equal to meanlog and standard deviation equal to sdlog.

[Distribution] -- Log Normal.

udlnorm(meanlog=0, sdlog=1, lb=0, ub=Inf)

Arguments

  • meanlog: mean of the distribution on the log scale.
  • sdlog: standard deviation of the distribution on the log scale.
  • lb: lower bound of (truncated) distribution.
  • ub: upper bound of (truncated) distribution.

Details

The log normal distribution has density

f(x)=12πσxexp(log(x)μ)2/(2sigma2)f(x)=1/(sqrt(2pi)sigmax)e((logxmu)2/(2sigma2)) f(x) =\frac{1}{\sqrt{2 \pi} \sigma x} \exp{- (\log(x)-\mu)^2 / (2 sigma^2)}f(x) = 1/(sqrt(2 pi) sigma x) e^-((log x - mu)^2 / (2 sigma^2))

where mumu is the mean and sigmasigma the standard deviation of the logarithm.

The domain of the distribution can be truncated to the interval (lb,ub).

Returns

An object of class "unuran.cont".

See Also

unuran.cont.

References

N.L. Johnson, S. Kotz, and N. Balakrishnan (1994): Continuous Univariate Distributions, Volume 1. 2nd edition, John Wiley & Sons, Inc., New York. Chap. 14, p. 207.

Author(s)

Josef Leydold and Wolfgang H"ormann unuran@statmath.wu.ac.at .

Examples

## Create distribution object for log normal distribution distr <- udlnorm() ## Generate generator object; use method PINV (inversion) gen <- pinvd.new(distr) ## Draw a sample of size 100 x <- ur(gen,100)
  • Maintainer: Josef Leydold
  • License: GPL (>= 2)
  • Last published: 2025-04-07