Re: [R] How to find maximum values on the density function of arandom variable

2009-03-13 Thread David Winsemius
.@r-project.org [mailto:r-help-boun...@r-project.org ] On Behalf Of Mike Lawrence Sent: Thursday, March 12, 2009 5:40 PM To: g...@ucalgary.ca Cc: r-help@r-project.org Subject: Re: [R] How to find maximum values on the density function of arandom variable rv <- rbinom(1,1,0.1) + rnorm(1

Re: [R] How to find maximum values on the density function of arandom variable

2009-03-13 Thread guox
g the >>> parameters >>> of the statistical algorithm doing the estimating ). This is the >>> sort of >>> thing that actually requires some careful thought and statistical >>> expertise. >>> You will find, I believe, that the prescription for finding

Re: [R] How to find maximum values on the density function of arandom variable

2009-03-13 Thread David Winsemius
- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org ] On Behalf Of Mike Lawrence Sent: Thursday, March 12, 2009 5:40 PM To: g...@ucalgary.ca Cc: r-help@r-project.org Subject: Re: [R] How to find maximum values on the density function of arandom variable rv <- rbin

Re: [R] How to find maximum values on the density function of arandom variable

2009-03-13 Thread guox
h Nonclinical Statistics > > -Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On > Behalf Of Mike Lawrence > Sent: Thursday, March 12, 2009 5:40 PM > To: g...@ucalgary.ca > Cc: r-help@r-project.org > Subject: Re: [R]

Re: [R] How to find maximum values on the density function of arandom variable

2009-03-12 Thread Bert Gunter
Sent: Thursday, March 12, 2009 5:40 PM To: g...@ucalgary.ca Cc: r-help@r-project.org Subject: Re: [R] How to find maximum values on the density function of arandom variable rv <- rbinom(1,1,0.1) + rnorm(1) d.rv = density(rv) d.x = d.rv$x d.y = d.rv$y d.rv.max = d.rv$x[which.max(d.rv$y)] plot(d.