Ah, this looks like Australian data :) One simple way would be to use the lowess function and fiddle with the f parameter (like bandwidth).
Michael On 22 November 2010 14:18, Roslina Zakaria <zrosl...@yahoo.com> wrote: > Hi, > > I would like to overlap the cdf curve for observed and generated data Here is > my code: > > plot(cdf,main ="CDF of the sum for winter > season-Hume",cex.axis=1.2,xlab="Rainfall (mm)", > xaxs="i",yaxs="i",col=c("black","red"), lty=c(1,1),ylab="Cumulative > probability", xlim=c(0,800),lwd=1) > lines(ecdf(datobs)) > legend("topright", legend = c("observed","fitted"), > col = c("black","red"), pch=c(NA,NA), lty = c(1, 1), > lwd=c(3,3),bty="n", pt.cex=2) > > It gives me the plots but it is not smooth. How do I adjust so that I will > get > two smooth cumulative density curves. > > Thank you for any help given. > > > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.