R-alpha: ECDFs

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Thu, 21 Aug 1997 23:02:06 +0200


>>>>> Thomas Lumley writes:

> On Tue, 19 Aug 1997, Kurt Hornik wrote:
>> 
>> Here's something what is needed for teaching elementary statistics:
>> Given a sample vector x, compute the corresponding ECDF, plot it, and
>> perhaps evaluate it at points other than the data points.

> The approx() function is supposed to do this (it currently only does
> linear interpolation).  If the right and left continuous step
> functions were added to approx then we could easily use approxfun to
> define the ECDF as a function closure, making it automatically
> available at any point you want. After all, the ECDF *is* a function.

Ah, very nice idea!

So, we'd have

	ecdf(x)

return a FUNCTION of class (e.g.) "step" which would on the one hand
have the right methods for it and on the other hand would allow us to
evaluate it at new points right away?

Martin, Peter?

-k
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-