dpih               package:KernSmooth               R Documentation

_S_e_l_e_c_t _a _H_i_s_t_o_g_r_a_m _B_i_n _W_i_d_t_h

_D_e_s_c_r_i_p_t_i_o_n:

     Uses direct plug-in methodology to select the bin width of  a
     histogram.

_U_s_a_g_e:

     dpih(x, scalest = "minim", level = 2L, gridsize = 401L, 
          range.x = range(x), truncate = TRUE)

_A_r_g_u_m_e_n_t_s:

       x: vector containing the sample on which the histogram is to be
          constructed. 

 scalest: estimate of scale.

          '"stdev"' - standard deviation is used.

          '"iqr"' - inter-quartile range divided by 1.349 is used.

          '"minim"' - minimum of '"stdev"' and '"iqr"' is used. 

   level: number of levels of functional estimation used in the plug-in
          rule. 

gridsize: number of grid points used in the binned approximations to
          functional estimates. 

 range.x: range over which functional estimates are obtained. The
          default is the minimum and maximum data values. 

truncate: if 'truncate' is 'TRUE' then observations outside of the
          interval specified by 'range.x' are omitted. Otherwise, they
          are used to weight the extreme grid points. 

_D_e_t_a_i_l_s:

     The direct plug-in approach, where unknown functionals that appear
     in expressions for the asymptotically optimal bin width and
     bandwidths are replaced by kernel estimates, is used. The normal
     distribution is used to provide an initial estimate.

_V_a_l_u_e:

     the selected bin width.

_B_a_c_k_g_r_o_u_n_d:

     This method for selecting the bin width of a histogram is
     described in Wand (1995). It is an extension of the normal scale
     rule of Scott (1979) and uses plug-in ideas from bandwidth
     selection for kernel density estimation (e.g. Sheather and Jones,
     1991).

_R_e_f_e_r_e_n_c_e_s:

     Scott, D. W. (1979).  On optimal and data-based histograms.
     _Biometrika_, *66*, 605-610.

     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. 

     Wand, M. P. (1995). Data-based choice of histogram binwidth.
     _University of New South Wales_, Australian Graduate School of
     Management  Working Paper Series No. 95-011.

_S_e_e _A_l_s_o:

     'hist'

_E_x_a_m_p_l_e_s:

     data(geyser, package="MASS")
     x <- geyser$duration
     h <- dpih(x)
     bins <- seq(min(x)-0.1, max(x)+0.1+h, by=h)
     hist(x, breaks=bins)

