Re: [R] Kernel density output

From: Martin Becker <martin.becker_at_mx.uni-saarland.de>
Date: Mon 15 Jan 2007 - 09:36:16 GMT

Florent Bresson schrieb:
> Hi,
>
> I'm using the density() command for a given vector x and I would like to know how to get the estimated value of the density for each element of the vector x instead of values corresponding to points from a grid.
>
>

Maybe not the best/most efficient way to do this, but

   splinefun(density(x))(x)

may work for you.
> Thanks
>
> Florent Bresson
>
>

Regards,

  Martin
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



R-help@stat.math.ethz.ch 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. Received on Mon Jan 15 20:45:18 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 15 Jan 2007 - 10:30:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.