Number 1 can be done as follows: x = rnorm(50); y = rnorm(50) xCDF = ecdf(x); yCDF = ecdf(y)
plot(xCDF) lines(yCDF,col=2) For the other ones, you are going to have to be a little more specific as to how you want to do the approximation...but ?density might be a place to start for #4, assuming you meant density of the PDF. If you meant CDF, it I think that's implicit in number 2. Michael Weylandt On Mon, Aug 22, 2011 at 2:15 PM, Jim Silverton <jim.silver...@gmail.com>wrote: > Hello all, > > I have two columns of numbers. I would like to do the following: > (1) Plot both cdfs, F1 and F2 on the same graph. > (2) Find smoothed approximations of F1 and F2 lets call them F1hat and > F2hat > (3) Find values for F1hat when we substitue a value of x in it. > (4) Find the corresponding densities of the cdfs. > Any ideas? > > -- > Thanks, > Jim. > > [[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. > [[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.