Reputation: 15
I have a CCDF plot in R for the whole probability exceedance (from 0-1). I want to see just the results of a probability interval from 10^(-3) to 10^(-8). How can I implement this?
My code:
# data
n01 <- rnorm(1000, mean = 27947623, sd = 575.839)
ecdf_n01 <- ecdf(n01)
# cumulative cdf
ccdf <- data.frame(x = sort(n01),
y = 1-ecdf_n01(sort(n01)))
# plot
plot(ccdf)
x <- sort(n01)
y <- mean(n01)/x
lines(x, y, col="red")
Upvotes: 1
Views: 55