sj                    package:sm                    R Documentation

_S_h_e_a_t_h_e_r-_J_o_n_e_s _c_r_i_t_e_r_i_o_n _f_o_r _n_o_n_p_a_r_a_m_e_t_r_i_c _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:

     This function computes a criterion associated with the
     Sheather-Jones plug-in method of selecting a smoothing parameter
     in nonparametric density estimation.  The selected smoothing
     parameter is identified by the point at which this criterion takes
     the value 0.

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

     sj(x, h)

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

       x: a vector of data. 

       h: a value of smoothing parameter. 

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

     see Section 2.4.4 of the reference below.  The function is called
     automatically by `hsj' and does not usually need to be called 
     independently.

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

     The value of the Sheather-Jones criterion.

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

     Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques
     for Data Analysis: the Kernel Approach with S-Plus Illustrations.
     Oxford University Press, Oxford.

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

     `cv', `hcv', `hsj', `hnorm'

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

     x      <- rnorm(50)
     hgrid  <- seq(0.1, 1, length = 10)
     sjgrid <- vector("numeric", length = length(hgrid))
     for (i in 1:10) sjgrid[i] <- sj(x, hgrid[i])
     plot(hgrid, sjgrid, type="l")
     abline(0, 0, lty=2)

