>>>>> "Vito" == Vito Ricci <[EMAIL PROTECTED]>
>>>>> on Thu, 17 Nov 2005 08:20:35 +0100 (CET) writes:
Vito> Dear UseRs,
Vito> maybe is a silly question: how can I get Empirical CDF
Vito> values from an object created with ecdf()?? Using
Vito> print I obtain:
Vito> Empirical CDF
Vito> Call: ecdf(t)
Vito> x[1:57] = 4.1, 4.4, 4.5, ..., 491.3, 671.27
help(ecdf) supposedly has enough explanation; however
it seems the author of the help page (guess who) was
mistaken about the "simple" in
>> Examples:
>>
>> ##-- Simple didactical ecdf example:
>> Fn <- ecdf(rnorm(12))
>> Fn; summary(Fn)
>> 12*Fn(knots(Fn)) == 1:12 ## == 1:12 if and only if there are no ties !
The clue is that the result of ecdf()
{ and also of stepfun(), approxfun() or splinefun() ! }
is a *function* (with some additional attributes); hence it's
as simple as
tt <- seq(-3, 3, by = 0.1)
Fn(tt)
Vito> Thanks in advance.
you're welcome.
Martin Maechler, ETH Zurich
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html