Sample smoothing parameters in adaptive density estimation
Sample smoothing parameters in adaptive density estimation
This function computes the sample smoothing parameters to be used in adaptive kernel density estimation, according to Silverman (1986).
hprop2f(x, h = h.norm(x), alpha =1/2, kernel ="gaussian")
Arguments
x: Vector or matrix of data.
h: Vector of smoothing parameters to be used to get a pilot estimate of the density function. It has length equal to NCOL(x).
alpha: Sensitivity parameter satysfying 0≤α≤1, giving the power to which raise the pilot density. Default value is 1/2. See details.
kernel: Kernel to be used to compute the pilot density estimate. It should be one of "gaussian" or "t7". See kepdf for further details.
Details
A vector of smoothing parameters hi is chosen for each sample point xi, as follows:
hi=h(gf^h(xi))−α
where f^h is a pilot kernel density estimate of the density function f, with vector of bandwidths h, and g is the geometric mean of f^h(xi), i=1,...,n. See Section 5.3.1 of the reference below.
Returns
Returns a matrix with the same dimensions of x where row i provides the vector of smoothing parameters for sample point xi.
References
Silverman, B. (1986). Density estimation for statistics and data analysis. Chapman and Hall, London.