hdrbw                 package:hdrcde                 R Documentation

_H_i_g_h_e_s_t _D_e_n_s_i_t_y _R_e_g_i_o_n _B_a_n_d_w_i_d_t_h

_D_e_s_c_r_i_p_t_i_o_n:

     Calculates optimal bandwidth for 1-dimensional highest density
     regions

_U_s_a_g_e:

     hdrbw(x, HDRlevel, gridsize = 801, nMChdr = 1e+06, graphProgress = FALSE) 

_A_r_g_u_m_e_n_t_s:

       x: Numerical vector containing data.

HDRlevel: HDR-level as defined in Hyndman (1996). Setting `HDRlevel'
          equal to p (0<p<1) corresponds to a probability of 1-p of
          inclusion in the highest density region.

gridsize: the number of equally spaced points used for binned kernel
          density estimation.

  nMChdr: the size of the Monte Carlo sample used for density quantile
          approximation of the highest density region, as described in
          Hyndman (1996).

graphProgress: logical flag: if `TRUE' then plots showing the progress
          of the bandwidth selection algorithm are produced.

_D_e_t_a_i_l_s:

     This is a plug-in rule for bandwidth selection tailored to highest
     density region estimation

_V_a_l_u_e:

     A numerical vector of length 1.

_A_u_t_h_o_r(_s):

     Matt Wand

_R_e_f_e_r_e_n_c_e_s:

     Hyndman, R.J. (1996). Computing and graphing highest density
     regions.  _The American Statistician_, *50*, 120-126.

     Samworth, R.J., and Wand, M.P. (2009).  Asymptotics and optimal 
     bandwidth selection for highest density region estimation.  
     Working paper. <URL: http://www.uow.edu.au/~mwand/hdrpap.pdf>.

_E_x_a_m_p_l_e_s:

     HDRlevelVal <- 0.55
     x <- faithful$eruptions
     hHDR <- hdrbw(x,HDRlevelVal)
     HDRhat <- hdr.den(x,prob=100*(1-HDRlevelVal),h=hHDR)

