[R] Cumulative density (kernel smoothing)

David Winsemius dwinsemius at comcast.net
Mon Feb 13 19:33:38 CET 2012


On Feb 13, 2012, at 1:01 PM, francogrex wrote:

> Hi, in R there is the function "density" which computes kernel density
> estimates. Is there a "cumulative" version of it? Something like  
> they have
> in Matlab:

I'm not aware of one, but you could use `integrate`. You will need to  
limit your range or use the version in package  logspline if your  
range is fixed. You will also need to account for the fact that the  
inteegral will only be approximately == 1. Searching the Archives will  
bring up several similar questions from prior years.\
> http://www.mathworks.nl/help/toolbox/stats/ksdensity.html
> I know there is ecdf, but I'm not sure it's based on kernel density
> smoothing. Thanks


`ecdf` is not based on density.

-- 

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list