Skip to content

Why giving negative density when doing kernel density estimate?

3 messages · Brian Ripley, 李俊杰

#
This is called 'rounding error', and has been discussed here previously.
If it matters to you (why?) use pmax(0, kde$y).

When doing numerical calculations you should always be aware that the 
numerical results will differ from algebraic ones, and that is all that is 
happening here.
On Sat, 30 Dec 2006, ?????? wrote: