How To Smooth Ecdf Plot
0
0
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

• 7.6k views
ADD COMMENT
3
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2724 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6