[R] numericDeriv and ecdf

Thomas W Blackwell tblackw at umich.edu
Fri Apr 25 14:55:49 CEST 2003


On only ten points, what did you expect ?  Even with 1000
observations, estimating a density is difficult, and has
been the subject of a century of research.  Kernel density
estimates are among the most successful.  For your immediate
application, try  plot(density(rnorm(10)), type="l"), etc.

-  tom blackwell  -  u michigan medical school  -  ann arbor  -

On Fri, 25 Apr 2003, Khamenia, Valery wrote:

> Hi All,
>
> following expression:
>
>   x <- sort(rnorm(10)); e <- ecdf(x); d <- numericDeriv(e(x),"x");
>
> makes d far from approximation of one dimensional pdf.
>
> What's wrong then here?
>
> Kind regards.
> ---------------------------------------------------------------------------
> Valery A.Khamenya
> Bioinformatics Department
> BioVisioN AG, Hannover



More information about the R-help mailing list