kde_hh: Boundary-corrected kernel density estimator of Hickman and...

View source: R/competitors.R

kde_hhR Documentation

Boundary-corrected kernel density estimator of Hickman and Hubbard (2015)

Description

Kernel density estimator with the transformation-based boundary correction of Karunamuni and Zhang (2008) at the lower endpoint of the support, as implemented by Hickman and Hubbard (2015) for first-price auctions (their 'kspdf_bc'; this function is an R translation of that code, whose authors ask that Hickman and Hubbard (2015) be cited). The bandwidth is Silverman's rule scaled by Haerdle's (1991) canonical-kernel constant. The estimate is set to zero outside the range of the data. With 'side = "both"' the same correction is applied at the upper endpoint through the reflected sample.

Usage

kde_hh(
  x,
  data,
  kernel = "triweight",
  side = c("lower", "both"),
  hardle = TRUE,
  h = NULL
)

Arguments

x

evaluation points.

data

observed sample (bids or pseudo-values).

kernel

'"triweight"' (default), '"gaussian"', '"epanechnikov"', '"quartic"', '"uniform"' or '"triangle"'.

side

'"lower"' (the original implementation) or '"both"'.

hardle

logical; use Haerdle's canonical bandwidth constant.

h

optional bandwidth override.

Value

a numeric vector with attribute '"h"' (the bandwidth used).

References

Hickman, B. R. and Hubbard, T. P. (2015). Replacing sample trimming with boundary correction in nonparametric estimation of first-price auctions. *Journal of Applied Econometrics*, 30, 739–762. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/jae.2385")}

Karunamuni, R. J. and Zhang, S. (2008). Some improvements on a boundary corrected kernel density estimator. *Statistics & Probability Letters*, 78, 499–507.

Examples

x <- rbeta(200, 2, 1)
g <- seq(0.01, 0.99, by = 0.01)
plot(g, kde_hh(g, x), type = "l"); lines(g, dbeta(g, 2, 1), lty = 2)

qdfauction documentation built on Nov. 10, 2026, 5:07 p.m.