Description Usage Arguments Value Author(s) References See Also Examples
This algorithm has some notable advantages from a statistical point of view. Regions of high density have not only taller bins (as is usual) but more narrow bins as well. Regions of lower denisty have not only shorter, but wider bins. This makes the probability density much more immediately obvious, and captures interesting features of heavy tails and skew with greater efficacy. Algorithms that yield The former oversmooths in regions of high density, and is poor at identifying sharp peaks and multimodality. By contrast, the latter variety oversmooths in regions of low density and can mask outliers and the heavy tails of more leptokurtotic distributions. Alternatively, a function can be supplied which will compute the intended number of breaks or the actual breakpoints as a function of x. For more information, see Denby & Mallows (2009). The original code was authored by Lorraine Denby, but some minor improvements have been made here.
1 | nclass.dhist(x, min.bins = NULL, max.bins = 75, b = 1.5, rx = range(x))
|
min.bins |
the minimum number of bins. Optional. |
max.bins |
max number of bins. Defaults to 100. |
b |
slope. See paper for details. Defaults to 1.5. |
rx |
range of data, if not taken from data. |
nbins |
number of bins. See Denby & Mallows (2009). |
A function that takes a single parameter, a numeric x specifying the data for which breaks are needed, and returns a vector of breaks.
Lorraine Denby, Brandon Vaughan
L. Denby and C. Mallows. Variations on the histogram. Journal of Computational and Graphical Statistics, 18 (1):21-31, 2009. URL http://pubs.amstat.org/doi/abs/10.1198/jcgs.2009.0002.
http://pubs.research.avayalabs.com/pdfs/ALR-2007-003-paper.pdf
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.