Plot a Histogram with Automatic Bin Width Selection

DESCRIPTION:

Plot a histogram with automatic bin width selection, using the Scott or Freedman-Diaconis formulae.

USAGE:

hist.scott(x, prob = T, ...)
hist.FD(x, prob = T,  ...)
nclass.scott(x)
nclass.FD(x)

REQUIRED ARGUMENTS:

x
A data vector

OPTIONAL ARGUMENTS:

prob
Should the plot have unit area, so be a density estimate?
...
Further arguments to hist.

VALUE:

For the nclass.* functions, the suggested number of classes.

SIDE EFFECTS:

The hist.* function plot a histogram.

DETAILS:

nclass.scott uses Scotts choice for a normal distribution based on the estimate of the standard error, and nclass.FD uses the Freedman-Diaconis choice based on the inter-quartile range.

REFERENCES:

Venables, W. N. and Ripley, B. D. (1999) Modern Applied Statistics with S-PLUS. Springer, pages 118-9.

SEE ALSO: