If you are going to be doing a lot of this then you might want to consider using logspline density estimates (logspline package) instead of kernel density estimates.
On Wed, Jul 11, 2012 at 8:33 AM, firdaus.janoos <fjan...@bwh.harvard.edu> wrote: > Hello, > > I wanted to know if there is a simple way of getting the inverse cdf for a > KDE estimate of a density (using the ks or KernSmooth packages) in R ? > > The method I'm using now is to perform a numerical integration of the pdf > to get the cdf and then doing a search for the desired probablity value, > which is highly inefficient and very slow. > > Thanks, > -fj > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. -- Gregory (Greg) L. Snow Ph.D. 538...@gmail.com ______________________________________________ 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.