bkde package:KernSmooth R Documentation _C_o_m_p_u_t_e _a _B_i_n_n_e_d _K_e_r_n_e_l _D_e_n_s_i_t_y _E_s_t_i_m_a_t_e _D_e_s_c_r_i_p_t_i_o_n: Returns x and y coordinates of the binned kernel density estimate of the probability density of the data. _U_s_a_g_e: bkde(x, kernel = "normal", canonical = FALSE, bandwidth, gridsize = 401L, range.x, truncate = TRUE) _A_r_g_u_m_e_n_t_s: x: vector of observations from the distribution whose density is to be estimated. Missing values are not allowed. bandwidth: the kernel bandwidth smoothing parameter. Larger values of 'bandwidth' make smoother estimates, smaller values of 'bandwidth' make less smooth estimates. The default is a bandwidth computed from the variance of 'x', specifically the 'oversmoothed bandwidth selector' of Wand and Jones (1995, page 61). 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 at which to estimate the density. 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, extended by the support of the kernel. 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: This is the binned approximation to the ordinary kernel density estimate. Linear binning is used to obtain the bin counts. For each 'x' value in the sample, the kernel is centered on that 'x' and the heights of the kernel at each datapoint are summed. This sum, after a normalization, is the corresponding 'y' value in the output. _V_a_l_u_e: a list containing the following components: x: vector of sorted 'x' values at which the estimate was computed. y: vector of density estimates at the corresponding 'x'. _B_a_c_k_g_r_o_u_n_d: Density estimation is a smoothing operation. Inevitably there is a trade-off between bias in the estimate and the estimate's variability: large bandwidths will produce smooth estimates that may hide local features of the density; small bandwidths may introduce spurious bumps into the estimate. _R_e_f_e_r_e_n_c_e_s: Wand, M. P. and Jones, M. C. (1995). _Kernel Smoothing._ Chapman and Hall, London. _S_e_e _A_l_s_o: 'density', 'dpik', 'hist', 'ksmooth'. _E_x_a_m_p_l_e_s: data(geyser, package="MASS") x <- geyser$duration est <- bkde(x, bandwidth=0.25) plot(est, type="l")