dpik package: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 = 2L, kernel = "normal", canonical = FALSE, 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 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 Gaussian 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. This can be abbreviated to any unique abbreviation. canonical: logical flag: if 'TRUE', canonically scaled kernels 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 outside the range specified by 'range.x' are ignored. _D_e_t_a_i_l_s: The direct plug-in approach, where unknown functionals that appear in expressions for the asymptotically optimal 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 bandwidth. _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 density 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, package="MASS") x <- geyser$duration h <- dpik(x) est <- bkde(x, bandwidth=h) plot(est,type="l")