

dpik(KernSmooth)                             R Documentation

_S_e_l_e_c_t _a _B_a_n_d_w_i_d_t_h _f_o_r _K_e_r_n_e_l _D_e_n_s_i_t_y _E_s_t_i_m_a_t_i_o_n

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

     Use direct plug-in methodology to select the bandwidth
     of a kernel density estimate.

_U_s_a_g_e_:

     dpik(x, scalest="minim", level=2, kernel="normal",
          canonical=F, gridsize=401, range.x=range(x),
          truncate=F)

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

       x: vector containing the sample on which the kernel
          density estimate 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.

  kernel: character string which determines the smoothing
          kernel.  `kernel' can be: `"normal"' - the Gaus-
          sian density function (the default).  `"box"' - a
          rectangular box.  `"epanech"' - the centred
          beta(2,2) density.  `"biweight"' - the centred
          beta(3,3) density.  `"triweight"' - the centred
          beta(4,4) density.

canonical: logical flag: if `TRUE', canonically scaled ker-
          nels are used

gridsize: the number of equally-spaced points over which
          binning is performed to obtain kernel functional
          approximation.

 range.x: vector containing the minimum and maximum values
          of `x' at which to compute the estimate.  The
          default is the minimum and maximum data values.

truncate: logical flag: if `TRUE', data with `x' values out-
          side the range specified by `range.x' are ignored.

_V_a_l_u_e_:

     the selected bandwidth.

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

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

_B_A_C_K_G_R_O_U_N_D_:

     This method for selecting the bandwidth of a kernel
     density estimate was proposed by Sheather and Jones
     (1991) and is described in Section 3.6 of Wand and
     Jones (1995).

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

     Sheather, S. J. and Jones, M. C. (1991).  A reliable
     data-based bandwidth selection method for kernel den-
     sity estimation.  Journal of the Royal Statistical
     Society, Series B, 53, 683-690.

     Wand, M. P. and Jones, M. C. (1995).  Kernel Smoothing.
     Chapman and Hall, London.

_S_e_e _A_l_s_o_:

     `bkde', `density', `ksmooth'

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

     data(geyser)
     x <- geyser$duration
     h <- dpik(x)
     est <- bkde(x,bandwidth=h)
     plot(est,type="l")

