Normal Reference Density Bandwidth Selection

DESCRIPTION:

Uses the normal reference density to select the bandwidth of a Gaussian kernel density estimator. This rule of thumb is presented in Silverman (1986, pp. 45-47).

USAGE:

bandwidth.nrd(x, freq)

REQUIRED ARGUMENTS:

x
a numeric vector

OPTIONAL ARGUMENTS:

freq
vector the same length as x, giving frequencies (positive integers). If supplied, equivalent to replacing x with rep(x, freq).

VALUE:

a bandwidth

DETAILS:

This function is taken from Venables and Ripley (1997).

REFERENCE:

Silverman, B. W. (1986) Density Estimation for Statistics and Data Analysis. Chapman and Hall.

Venables, W. N. and Ripley, B. D. (1997) Modern Applied Statistics with S-PLUS, Second Edition. Springer.

SEE ALSO:

, , , , .

EXAMPLES:

bandwidth.nrd(rnorm(300))