On 6/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> hi all:
>
> ecdf() is the empirical cumulative distribution function, but I need the
> INVERSE cumulative distribution.
>
> how can I calculate it?
Two ways:
1. eccdf <- function(x) { return( 1 - ecdf(x)(x) ) }
This returns an array of element, not an object (like ecdf)
2. Cut&Paste "ecdf" code (from R write "ecdf" and then Enter) into a
new function "eccdf" (or whatever u want); in place of "cumsum(...)"
write "1-cumsum(...)", and rename the class name "ecdf" in"eccdf" (or
other). Note, doing "plot(eccdf(x))" you will not get similar result
to "plot(ecdf(x))" since the last one call "plot.ecdf". By the way you
can write a "plot.eccdf" function.
-- Marco
>
> thank you in advance
>
> /salva
>
> ______________________________________________
> [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
> and provide commented, minimal, self-contained, reproducible code.
>
______________________________________________
[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
and provide commented, minimal, self-contained, reproducible code.