'Calculating MISE for histograms/ KDE

I try to find a way to calculate the error between a histogram/ a KDE and the density I try to approximate with the MISE (Mean Integrated Squared Error): E[∫(e(x)-f(x))^2]

e(x) is the estimator (like a histogram or a kernel density estimator) and f(x) is the real density function.

There is the R-Code "mise()" but this one only accepts "bounded density objects" inside.

So my question is: Does anybody know how to transform a histogram or a kernel density estimator into a "bounded density object". So far I only can plot the estimators.

Thank you

r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source