distr (version 2.1.1)

Lnorm-class: Class "Lnorm"

Description

The log normal distribution has density $$d(x) = \frac{1}{\sqrt{2\pi}\sigma x} e^{-(\log(x) - \mu)^2/2 \sigma^2}$$ where $\mu$, by default $=0$, and $\sigma$, by default $=1$, are the mean and standard deviation of the logarithm. C.f. rlnorm

Arguments

Objects from the Class

Objects can be created by calls of the form Lnorm(meanlog, sdlog). This object is a log normal distribution.

Extends

Class "AbscontDistribution", directly. Class "UnivariateDistribution", by class "AbscontDistribution". Class "Distribution", by class "AbscontDistribution".

concept

  • absolutely continuous distribution
  • Log-Normal distribution
  • S4 distribution class

See Also

LnormParameter-class AbscontDistribution-class Reals-class rlnorm

Examples

Run this code
L <- Lnorm(meanlog=1,sdlog=1) # L is a lnorm distribution with mean=1 and sd=1.
r(L)(1) # one random number generated from this distribution, e.g. 3.608011
d(L)(1) # Density of this distribution is 0.2419707 for x=1.
p(L)(1) # Probability that x<1 is 0.1586553.
q(L)(.1) # Probability that x<0.754612 is 0.1.
meanlog(L) # meanlog of this distribution is 1.
meanlog(L) <- 2 # meanlog of this distribution is now 2.

Run the code above in your browser using DataCamp Workspace