EVOLUTION-MANAGER
Edit File: Logistic.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 Logistic 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 Logistic {stats}"><tr><td>Logistic {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>The Logistic Distribution</h2> <h3>Description</h3> <p>Density, distribution function, quantile function and random generation for the logistic distribution with parameters <code>location</code> and <code>scale</code>. </p> <h3>Usage</h3> <pre> dlogis(x, location = 0, scale = 1, log = FALSE) plogis(q, location = 0, scale = 1, lower.tail = TRUE, log.p = FALSE) qlogis(p, location = 0, scale = 1, lower.tail = TRUE, log.p = FALSE) rlogis(n, location = 0, scale = 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>location, scale</code></td> <td> <p>location and scale parameters.</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>If <code>location</code> or <code>scale</code> are omitted, they assume the default values of <code>0</code> and <code>1</code> respectively. </p> <p>The Logistic distribution with <code>location</code> <i>= m</i> and <code>scale</code> <i>= s</i> has distribution function </p> <p style="text-align: center;"><i>F(x) = 1 / (1 + exp(-(x-m)/s))</i></p> <p> and density </p> <p style="text-align: center;"><i>f(x) = 1/s exp((x-m)/s) (1 + exp((x-m)/s))^-2.</i></p> <p>It is a long-tailed distribution with mean <i>m</i> and variance <i>π^2 /3 s^2</i>. </p> <h3>Value</h3> <p><code>dlogis</code> gives the density, <code>plogis</code> gives the distribution function, <code>qlogis</code> gives the quantile function, and <code>rlogis</code> generates random deviates. </p> <p>The length of the result is determined by <code>n</code> for <code>rlogis</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><code>qlogis(p)</code> is the same as the well known ‘<em>logit</em>’ function, <i>logit(p) = log(p/(1-p))</i>, and <code>plogis(x)</code> has consequently been called the ‘inverse logit’. </p> <p>The distribution function is a rescaled hyperbolic tangent, <code>plogis(x) == (1+ <a href="../../base/html/Hyperbolic.html">tanh</a>(x/2))/2</code>, and it is called a <em>sigmoid function</em> in contexts such as neural networks. </p> <h3>Source</h3> <p><code>[dpq]logis</code> are calculated directly from the definitions. </p> <p><code>rlogis</code> uses inversion. </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 2, chapter 23. Wiley, New York. </p> <h3>See Also</h3> <p><a href="Distributions.html">Distributions</a> for other standard distributions. </p> <h3>Examples</h3> <pre> var(rlogis(4000, 0, scale = 5)) # approximately (+/- 3) pi^2/3 * 5^2 </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>