Dear all, I would like for a given vector to calculate the pdf and the cdf and then plot these two graphs. Is there in R any toolkit that can help me do that fast? Regards Alex
Do you have a reproducible example? As posed I have no idea what this vector contains. Are you assuming a specific distribution type and using these vectors to parameterize it? On Tue, May 17, 2011 at 10:08 AM, Alaios <alaios at yahoo.com> wrote:> Dear all, > I would like for a given vector to calculate the pdf and the cdf and then plot these two graphs. > Is there in R any toolkit that can help me do that fast? > > Regards > Alex > > ______________________________________________ > R-help at 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. >-- ==============================================Jon Daily Technician ==============================================#!/usr/bin/env outside # It's great, trust me.
I like the function Ecdf in the Hmisc package. For the pdf, you can also use plot(density(x)), which is in the stats package. ??Ecdf -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Alaios Sent: Tuesday, May 17, 2011 10:09 AM To: R-help at r-project.org Subject: [R] pdf (probability distribution function) and cdf Dear all, I would like for a given vector to calculate the pdf and the cdf and then plot these two graphs. Is there in R any toolkit that can help me do that fast? Regards Alex ______________________________________________ R-help at 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.