AW: [R] numericDeriv and ecdf
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Apr 25 15:29:02 CEST 2003
An empirical CDF is a step function: it does not have a derivative at the
jump points, and has a zero derivative everywhere else.
What is this function `numericDerivative': do you mean `numericDeriv'?
If so, it seems to be intended for differentiable functions, and
calculates one-sided derivatives. In your example the one-sided
derivatives are all zero.
On Fri, 25 Apr 2003, Khamenia, Valery wrote:
> > 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.
>
> wait, you misunderstood me!
>
> I'd like to see 10 or 9 points with estimated values of
> *numerical* derivatives according to ecdf output.
> And that's it.
>
> Now look into output of numericDerivative in my example:
>
> [1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
> attr(,"gradient")
> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
> [1,] 0 0 0 0 0 0 0 0 0 0
> [2,] 0 0 0 0 0 0 0 0 0 0
> [3,] 0 0 0 0 0 0 0 0 0 0
> [4,] 0 0 0 0 0 0 0 0 0 0
> [5,] 0 0 0 0 0 0 0 0 0 0
> [6,] 0 0 0 0 0 0 0 0 0 0
> [7,] 0 0 0 0 0 0 0 0 0 0
> [8,] 0 0 0 0 0 0 0 0 0 0
> [9,] 0 0 0 0 0 0 0 0 0 0
> [10,] 0 0 0 0 0 0 0 0 0 0
>
> What could you say now?
>
> With kind regards,
> Valery A.Khamenya
> ---------------------------------------------------------------------------
> Bioinformatics Department
> BioVisioN AG, Hannover
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list