width.SJ                package:MASS                R Documentation

Bandwidth Selection by Pilot Estimation of Derivatives

Description:

     Uses the method of Sheather & Jones (1991) to select the bandwidth
     of a Gaussian kernel density estimator.

Usage:

     width.SJ(x, nb = 1000, lower, upper, method = c("ste", "dpi"))

Arguments:

       x: a numeric vector 

      nb: number of bins to use. 

upper, lower: range over which to search for solution if 'method =
          "ste"'. 

  method: Either '"ste"' ("solve-the-equation") or '"dpi"' ("direct
          plug-in"). 

Value:

     a bandwidth.

References:

     Sheather, S. J. and Jones, M. C. (1991) A reliable data-based
     bandwidth selection method for kernel density estimation. _Journal
     of the Royal Statistical Society series B_ *53*, 683-690.

     Scott, D. W. (1992) _Multivariate Density Estimation: Theory,
     Practice, and  Visualization._ Wiley.

     Wand, M. P. and Jones, M. C. (1995) _Kernel Smoothing._ Chapman &
     Hall.

See Also:

     'ucv', 'bcv', 'density'

Examples:

     attach(geyser)
     width.SJ(duration, method = "dpi")
     width.SJ(duration)
     detach()

     width.SJ(galaxies, method = "dpi")
     width.SJ(galaxies)

