Entering edit mode
10.1 years ago
Chirag Nepal
★
2.4k
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.