Created
June 14, 2012 15:31
-
-
Save indapa/2930996 to your computer and use it in GitHub Desktop.
Plot empirical CDF function in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#plot the empirical CDF | |
x=rnorm(100) # 100 random draws from standard normal | |
f=ecdf(x) # ecdf returns a function | |
percentiles=f(x) # return the percentiles of the data points | |
plot(percentiles, x) | |
#see ?ecdf for more information |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment