Skip to content
Prev 304977 / 398506 Next

Histogram to KDE

To bootstrap from a histogram, use
  sample(bins, replace = TRUE, prob = counts)

Note that a kernel density estimate is biased, so some bootstrap
confidence intervals have poor coverage properties.
Furthermore, if the kernel bandwidth is data-driven then the estimate
is not functional, so some bootstrap and jackknife methods won't work right.

Tim Hesterberg
http://www.timhesterberg.net
New:  Mathematical Statistics with Resampling and R, Chihara & Hesterberg