[R] density() vs. KernSmooth::bkde

Mario Valle mvalle at cscs.ch
Mon Jan 18 15:04:21 CET 2010


Thanks Prof. Ripley!
Indeed the correct comparison is between density() and the more modern 
GenKern::KernSec() and in this case the difference is negligible, so I 
will use density() for my work.
Thanks!
		mario

On 18-Jan-10 13:57, Prof Brian Ripley wrote:
> On Mon, 18 Jan 2010, Mario Valle wrote:
>
>> Any advice when to use denstity() and when the KernSmooth package bkde() to
>> smooth a histogram?
>>
>> No specific problem to use either one, but I'm curious why there are two so
>> similar implementations.
>
> They are fundamentally different.  density() uses FFT: bkde() does
> not and is more flexible as a result  Both use binning.
>
> There are only a limited number of ways to implement something as
> simple as KDE, and most of them have appeared in R/S-PLUS.  Remember
> that KernSmooth was written for S-PLUS and predates R (at least in
> anything like its current form).
>
>> Thanks!
>> 		mario
>>
>> --
>> Ing. Mario Valle
>> Data Analysis and Visualization Group            | http://www.cscs.ch/~mvalle
>> Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
>> v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82
>>
>> ______________________________________________
>> R-help at 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.
>>
>

-- 
Ing. Mario Valle
Data Analysis and Visualization Group            | 
http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82



More information about the R-help mailing list