[R] Computing inverse cdf (quantile function) from a KDE

Greg Snow 538280 at gmail.com
Thu Jul 12 19:31:43 CEST 2012


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 <fjanoos at 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 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.



-- 
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com



More information about the R-help mailing list