EVOLUTION-MANAGER
Edit File: bandwidth.nrd.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: Bandwidth for density() via Normal Reference 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 bandwidth.nrd {MASS}"><tr><td>bandwidth.nrd {MASS}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Bandwidth for density() via Normal Reference Distribution </h2> <h3>Description</h3> <p>A well-supported rule-of-thumb for choosing the bandwidth of a Gaussian kernel density estimator. </p> <h3>Usage</h3> <pre> bandwidth.nrd(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A data vector. </p> </td></tr></table> <h3>Value</h3> <p>A bandwidth on a scale suitable for the <code>width</code> argument of <code>density</code>. </p> <h3>References</h3> <p>Venables, W. N. and Ripley, B. D. (2002) <em>Modern Applied Statistics with S.</em> Springer, equation (5.5) on page 130. </p> <h3>Examples</h3> <pre> # The function is currently defined as function(x) { r <- quantile(x, c(0.25, 0.75)) h <- (r[2] - r[1])/1.34 4 * 1.06 * min(sqrt(var(x)), h) * length(x)^(-1/5) } </pre> <hr /><div style="text-align: center;">[Package <em>MASS</em> version 7.3-51.4 <a href="00Index.html">Index</a>]</div> </body></html>