Howto Plot "Reverse" Cumulative Frequency Graph With ECDF
Posted
by neversaint
on Stack Overflow
See other posts from Stack Overflow
or by neversaint
Published on 2010-03-19T07:01:25Z
Indexed on
2010/03/19
7:11 UTC
Read the original article
Hit count: 226
I have no problem plotting the following cumulative frequency graph plot like this.
library(Hmisc)
pre.test <- rnorm(100,50,10)
post.test <- rnorm(100,55,10)
x <- c(pre.test, post.test)
g <- c(rep('Pre',length(pre.test)),rep('Post',length(post.test)))
Ecdf(x, group=g, what="f", xlab='Test Results', label.curves=list(keys=1:2))
But I want to show the graph in forms of the "reverse" cumulative frequency of values > x ? (i.e. something equivalent to what="1-f").
Is there a way to do it?
Other suggestions in R other than using Hmisc are also very much welcomed.
© Stack Overflow or respective owner