Learn R Programming

EnvStats (version 3.0.0)

Lognormal3: The Three-Parameter Lognormal Distribution

Description

Density, distribution function, quantile function, and random generation for the three-parameter lognormal distribution with parameters meanlog, sdlog, and threshold.

Usage

dlnorm3(x, meanlog = 0, sdlog = 1, threshold = 0)
  plnorm3(q, meanlog = 0, sdlog = 1, threshold = 0)
  qlnorm3(p, meanlog = 0, sdlog = 1, threshold = 0)
  rlnorm3(n, meanlog = 0, sdlog = 1, threshold = 0)

Value

dlnorm3 gives the density, plnorm3 gives the distribution function,

qlnorm3 gives the quantile function, and rlnorm3 generates random deviates.

Arguments

x

vector of quantiles.

q

vector of quantiles.

p

vector of probabilities between 0 and 1.

n

sample size. If length(n) is larger than 1, then length(n) random values are returned.

meanlog

vector of means of the distribution of the random variable on the log scale. The default is meanlog=0.

sdlog

vector of (positive) standard deviations of the random variable on the log scale. The default is sdlog=1.

threshold

vector of thresholds of the random variable on the log scale. The default is threshold=0.

Author

Steven P. Millard (EnvStats@ProbStatInfo.com)

Details

The three-parameter lognormal distribution is simply the usual two-parameter lognormal distribution with a location shift.

Let \(X\) be a random variable with a three-parameter lognormal distribution with parameters meanlog=\(\mu\), sdlog=\(\sigma\), and threshold=\(\gamma\). Then the random variable \(Y = X - \gamma\) has a lognormal distribution with parameters meanlog=\(\mu\) and sdlog=\(\sigma\). Thus,

  • dlnorm3 calls dlnorm using the arguments x = x - threshold, meanlog = meanlog, sdlog = sdlog

  • plnorm3 calls plnorm using the arguments q = q - threshold, meanlog = meanlog, sdlog = sdlog

  • qlnorm3 calls qlnorm using the arguments q = q, meanlog = meanlog, sdlog = sdlog and then adds the argument threshold to the result.

  • rlnorm3 calls rlnorm using the arguments n = n, meanlog = meanlog, sdlog = sdlog and then adds the argument threshold to the result.

The threshold parameter \(\gamma\) affects only the location of the three-parameter lognormal distribution; it has no effect on the variance or the shape of the distribution.

Denote the mean, variance, and coefficient of variation of \(Y = X - \gamma\) by: $$E(Y) = \theta$$ $$Var(Y) = \eta^2$$ $$CV(Y) = \tau = \eta/\theta$$ Then the mean, variance, and coefficient of variation of \(X\) are given by: $$E(X) = \theta + \eta$$ $$Var(X) = \eta^2$$ $$CV(X) = \frac{\eta}{\theta + \gamma} = \frac{\tau \theta}{\theta + \gamma}$$ The relationships between the parameters \(\mu\), \(\sigma\), \(\theta\), \(\eta\), and \(\tau\) are as follows: $$\theta = \beta \sqrt{\omega}$$ $$\eta = \beta \sqrt{\omega (\omega - 1)}$$ $$\tau = \sqrt{\omega - 1}$$ $$\mu = log(\frac{\theta}{\sqrt{\tau^2 + 1}})$$ $$\sigma = \sqrt{log(\tau^2 + 1)}$$ where $$\beta = e^\mu, \omega = exp(\sigma^2)$$

Since quantiles of a distribution are preserved under monotonic transformations, the median of \(X\) is: $$Median(X) = \gamma + \beta$$

References

Aitchison, J., and J.A.C. Brown (1957). The Lognormal Distribution (with special references to its uses in economics). Cambridge University Press, London, 176pp.

Crow, E.L., and K. Shimizu. (1988). Lognormal Distributions: Theory and Applications. Marcel Dekker, New York, 387pp.

Forbes, C., M. Evans, N. Hastings, and B. Peacock. (2011). Statistical Distributions. Fourth Edition. John Wiley and Sons, Hoboken, NJ.

Johnson, N. L., S. Kotz, and N. Balakrishnan. (1994). Continuous Univariate Distributions, Volume 1. Second Edition. John Wiley and Sons, New York.

Ott, W.R. (1990). A Physical Explanation of the Lognormality of Pollutant Concentrations. Journal of the Air and Waste Management Association 40, 1378--1383.

Ott, W.R. (1995). Environmental Statistics and Data Analysis. Lewis Publishers, Boca Raton, FL, Chapter 9.

Royston, J.P. (1992b). Estimation, Reference Ranges and Goodness of Fit for the Three-Parameter Log-Normal Distribution. Statistics in Medicine 11, 897--912.

Wicksell, S.D. (1917). On Logarithmic Correlation with an Application to the Distribution of Ages at First Marriage. Medd. Lunds. Astr. Obs. 84, 1--21.

See Also

Lognormal, elnorm3, Probability Distributions and Random Numbers.

Examples

Run this code
  # Density of the three-parameter lognormal distribution with 
  # parameters meanlog=1, sdlog=2, and threshold=10, evaluated at 10.5:

  dlnorm3(10.5, 1, 2, 10) 
  #[1] 0.278794

  #----------

  # The cdf of the three-parameter lognormal distribution with 
  # parameters meanlog=2, sdlog=3, and threshold=5, evaluated at 9: 

  plnorm3(9, 2, 3, 5) 
  #[1] 0.4189546

  #----------

  # The median of the three-parameter lognormal distribution with 
  # parameters meanlog=2, sdlog=3, and threshold=20: 

  qlnorm3(0.5, 2, 3, 20) 
  #[1] 27.38906

  #----------

  # Random sample of 3 observations from the three-parameter lognormal 
  # distribution with parameters meanlog=2, sdlog=1, and threshold=-5. 
  # (Note: the call to set.seed simply allows you to reproduce this example.)

  set.seed(20) 
  rlnorm3(3, 2, 1, -5) 
  #[1] 18.6339749 -0.8873173 39.0561521

Run the code above in your browser using DataLab