This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Smooth Ecdf Plot

Dear all,

I wanted to plot a smooth ecdf plot, without step function.

rCode:

x1=ecdf(rnorm(100))

x2=ecdf(rnorm(100))

plot(x1,verticals=T,do.points=F, col="red")

lines(x2,verticals=T,do.points=F)

Can someone suggest me how to smooth the ecdf plot from the above code.

Thanks in advance !

cheers Chirag

No. The empirical cdf is by definition a step function. If you want a theoretical cdf it will not come from or reflect the data.

Thanks Karl ! How can i interpolate the cdf points and draw a line along those points, so it looks like a smooth curve.

karl.stamm is correct. If and only if your data fits a known distribution then you can use that distribution to create a smooth ecdf.

0 answers

No answers yet.

Log in to answer this question.