[R] Help - Probability scale on an ECDF plot
Don MacQueen
macq at llnl.gov
Wed Oct 28 05:24:24 CET 2009
You need to tell the mailing list what you have tried. That way you
will get better help.
Here is one solution.
> foo <- rnorm(1000)
> probs <- seq(0,1,.1)
> foo <- rnorm(1000)
> bah <- quantile(foo,probs)
> plot(bah,probs)
But it turns out that
?ecdf
tells you there is an ecdf function. And then
plot(ecdf(foo))
gives an ECDF plot with a probability scale on the y axis.
(So it's hard to imagine what you were doing that didn't give you a
probability axis)
-Don
At 5:22 PM -0700 10/27/09, Jessica Goin wrote:
>Hello;
>
>Can anyone tell me how to set my y-axis to a probability scale on an ECDF
>plot? Or alternatively, how to generate a plot of percent cumulative
>probability against concentration? DASplusR does this and calls it a CP
>plot, but I would like to be able to generate this outside of DASplusR-
>
>Thank you!
>
> [[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org 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.
--
---------------------------------
Don MacQueen
Lawrence Livermore National Laboratory
Livermore, CA, USA
925-423-1062
macq at llnl.gov
More information about the R-help
mailing list