sjpi                 package:locfit                 R Documentation

_S_h_e_a_t_h_e_r-_J_o_n_e_s _P_l_u_g-_i_n _b_a_n_d_w_i_d_t_h _c_r_i_t_e_r_i_o_n.

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

     Given a dataset and set of pilot bandwidths, this function
     computes a bandwidth via the plug-in method, and the assumed
     `pilot' relationship of Sheather and Jones (1991). The S-J method
     chooses the bandwidth at which the two intersect.

     The purpose of this function is to demonstrate the sensitivity of
     plug-in methods to pilot bandwidths and assumptions. This function
     does not provide a reliable method of bandwidth selection.

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

     sjpi(x, a)

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

       x: data vector

       a: vector of pilot bandwidths

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

     A matrix with four columns; the number of rows equals the length
     of 'a'. The first column is the plug-in selected bandwidth. The
     second column is the pilot bandwidths 'a'. The third column is the
     pilot bandwidth according to the assumed relationship of Sheather
     and Jones. The fourth column is an intermediate calculation.

_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 density estimation. JRSS-B
     53, 683-690.

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

     'locfit', 'locfit.raw', 'lcvplot'

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

     # Fig 10.2 (S-J parts) from Loader (1999).
     data(geyser)
     gf <- 2.5
     a <- seq(0.05, 0.7, length=100)
     z <- sjpi(geyser, a)

     # the plug-in curve. Multiplying by gf=2.5 corresponds to Locfit's standard
     # scaling for the Gaussian kernel.
     plot(gf*z[, 2], gf*z[, 1], type = "l", xlab = "Pilot Bandwidth k", ylab
          = "Bandwidth h")

     # Add the assumed curve.
     lines(gf * z[, 3], gf * z[, 1], lty = 2)
     legend(gf*0.05, gf*0.4, lty = 1:2, legend = c("Plug-in", "SJ assumed"))

