EVOLUTION-MANAGER
Edit File: Lognormal.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: The Log Normal Distribution</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for Lognormal {stats}"><tr><td>Lognormal {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>The Log Normal Distribution</h2> <h3>Description</h3> <p>Density, distribution function, quantile function and random generation for the log normal distribution whose logarithm has mean equal to <code>meanlog</code> and standard deviation equal to <code>sdlog</code>. </p> <h3>Usage</h3> <pre> dlnorm(x, meanlog = 0, sdlog = 1, log = FALSE) plnorm(q, meanlog = 0, sdlog = 1, lower.tail = TRUE, log.p = FALSE) qlnorm(p, meanlog = 0, sdlog = 1, lower.tail = TRUE, log.p = FALSE) rlnorm(n, meanlog = 0, sdlog = 1) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x, q</code></td> <td> <p>vector of quantiles.</p> </td></tr> <tr valign="top"><td><code>p</code></td> <td> <p>vector of probabilities.</p> </td></tr> <tr valign="top"><td><code>n</code></td> <td> <p>number of observations. If <code>length(n) > 1</code>, the length is taken to be the number required.</p> </td></tr> <tr valign="top"><td><code>meanlog, sdlog</code></td> <td> <p>mean and standard deviation of the distribution on the log scale with default values of <code>0</code> and <code>1</code> respectively.</p> </td></tr> <tr valign="top"><td><code>log, log.p</code></td> <td> <p>logical; if TRUE, probabilities p are given as log(p).</p> </td></tr> <tr valign="top"><td><code>lower.tail</code></td> <td> <p>logical; if TRUE (default), probabilities are <i>P[X ≤ x]</i>, otherwise, <i>P[X > x]</i>.</p> </td></tr> </table> <h3>Details</h3> <p>The log normal distribution has density </p> <p style="text-align: center;"><i>f(x) = 1/(√(2 π) σ x) e^-((log x - μ)^2 / (2 σ^2))</i></p> <p>where <i>μ</i> and <i>σ</i> are the mean and standard deviation of the logarithm. The mean is <i>E(X) = exp(μ + 1/2 σ^2)</i>, the median is <i>med(X) = exp(μ)</i>, and the variance <i>Var(X) = exp(2*μ + σ^2)*(exp(σ^2) - 1)</i> and hence the coefficient of variation is <i>sqrt(exp(σ^2) - 1)</i> which is approximately <i>σ</i> when that is small (e.g., <i>σ < 1/2</i>). </p> <h3>Value</h3> <p><code>dlnorm</code> gives the density, <code>plnorm</code> gives the distribution function, <code>qlnorm</code> gives the quantile function, and <code>rlnorm</code> generates random deviates. </p> <p>The length of the result is determined by <code>n</code> for <code>rlnorm</code>, and is the maximum of the lengths of the numerical arguments for the other functions. </p> <p>The numerical arguments other than <code>n</code> are recycled to the length of the result. Only the first elements of the logical arguments are used. </p> <h3>Note</h3> <p>The cumulative hazard <i>H(t) = - log(1 - F(t))</i> is <code>-plnorm(t, r, lower = FALSE, log = TRUE)</code>. </p> <h3>Source</h3> <p><code>dlnorm</code> is calculated from the definition (in ‘Details’). <code>[pqr]lnorm</code> are based on the relationship to the normal. </p> <p>Consequently, they model a single point mass at <code>exp(meanlog)</code> for the boundary case <code>sdlog = 0</code>. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <p>Johnson, N. L., Kotz, S. and Balakrishnan, N. (1995) <em>Continuous Univariate Distributions</em>, volume 1, chapter 14. Wiley, New York. </p> <h3>See Also</h3> <p><a href="Distributions.html">Distributions</a> for other standard distributions, including <code><a href="Normal.html">dnorm</a></code> for the normal distribution. </p> <h3>Examples</h3> <pre> dlnorm(1) == dnorm(0) </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>