On Sat, Jul 16, 2011 at 10:26 AM, Roberto Molinari <roberto.molin...@hotmail.it> wrote: > > Dear R users, > > I am currently using the locpoly function from the KernSmooth package to > estimate densities. However, I have some trouble understanding how this > estimation technique is implemented in R. My main concern comes from the fact > that this function gives negative estimates when the bandwidth is > sufficiently large (mainly in the tails of distributions). I have read some > articles on this technique (C. Loader 1996,Hjort and Jones 1996) but from > none have I managed to understand how this is possible.
Hi Robert, I'm also getting strange results (not negative densities though!). I'm getting NaN if the bandwidth is too small. I wonder if both of use ran into a floating point calculation issue. Note that my question is here http://stackoverflow.com/questions/22433502/r-locpoly-is-incorrectly-returning-nan. Best wishes, Xu ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.