[R] Kernel Density estimation at specific points

Bert Gunter gunter.berton at gene.com
Wed Feb 13 22:16:28 CET 2013


Please learn to search!

A google search on "R density estimation" brought up the akj()
function in the quantreg package, which would seem to do what you
requested. However, I didn't look very hard and there are probably
still others in other packages.

-- Bert

On Wed, Feb 13, 2013 at 8:35 AM, Robert Duval <rduval at gmail.com> wrote:
> Dear All,
>
> I was wondering whether someone has created a kernel density evaluator that
> estimates the density at given specified points.
>
> The regular density() function evaluates the kernel at equidistant points,
> but I am interested in doing such evaluation along a list of values
> existing in a pre-specified vector. (Similar to the option at() in the
> kdensity command in Stata).
>
> This question has appeared before in the R-list, most recently in 2011 in :
>
> http://tolstoy.newcastle.edu.au/R/e14/help/11/06/5232.html
>
> There another list member suggested programming a home-made evaluator.
> While the posted solution works, it is not as general, nor as fast as
> density(). So I was wondering whether someone had recently came up with a
> more efficient way of doing this.
>
> N.B. Many users have suggested using some sort of interpolation over the
> values provided by density(). However, for the problem I have at hand this
> is not what I need.
>
> Any help will be appreciated.
> Robert
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm



More information about the R-help mailing list