Re: [R] Help interpreting density().

From: <Bill.Venables_at_csiro.au>
Date: Wed, 30 Jul 2008 08:54:07 +1000

In general there is no relation. The output of density gives you something you can plot, essentially. So the x-values are simply a series of points covering the range of the density and the y values are the ordinates at those abscissae.

try

plot(density(rnorm(1000)^2)))

for example.

Bill Venables
CSIRO Laboratories
PO Box 120, Cleveland, 4163
AUSTRALIA

Office Phone (email preferred): +61 7 3826 7251
Fax (if absolutely necessary):  +61 7 3826 7304
Mobile:                         +61 4 8819 4402
Home Phone:                     +61 7 3286 7700
mailto:Bill.Venables_at_csiro.au
http://www.cmis.csiro.au/bill.venables/

-----Original Message-----
From: rkevinburton_at_charter.net [mailto:rkevinburton_at_charter.net] Sent: Tuesday, 29 July 2008 6:09 PM
To: r-help_at_r-project.org; Venables, Bill (CMIS, Cleveland) Subject: RE: [R] Help interpreting density().

Sorry, poor example. I started with normal deviates and jumped without thinking to Poisson. The main crux of the question is how does the output of density relate to the parameters that describe some of the standard distributions (mean and std for normal, lambda for Poisson, n and p for Binomial, alpha and beta for Beta, etc.).

Thank you.

Kevin


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. Received on Tue 29 Jul 2008 - 22:56:32 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 29 Jul 2008 - 23:32:55 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive