Learn R Programming

gestate (version 1.6.0)

Lognormal: Log-normal Curve constructor function

Description

This creates a Curve object for a Log-normal distribution.
Curve objects contain all necessary information to describe a distribution, including functions and parameters describing it.
Parameterisation follows that used by plnorm etc. See Details for more information on parameterisation.

Usage

Lognormal(mu, sigma = 1)

Arguments

mu

Mean (on log scale) parameter for Log-normal distribution.

sigma

Standard deviation (on log scale) parameter for Log-normal distribution.

Author

James Bell

Details

The log normal distribution has parameterisation:
f(x) = 1/(sqrt(2*pi) sigma x) e^-((log x - mu)^2 / (2 sigma^2))
F(x) = 0.5(1 + erf((log(x)-mu)/(sigma sqrt(2))))
where erf is the error function.

Examples

Run this code
Lognormal(mu=5,sigma=1.2)
Lognormal(6)

Run the code above in your browser using DataLab