Re: [R] Re; Fitting a Beta distribution

From: Ben Bolker <bbolker_at_gmail.com>
Date: Wed, 16 Mar 2011 16:20:14 +0000

Jim Silverton <jim.silverton <at> gmail.com> writes:

>
> I want to fit some p-values to a beta distribution. But the problem is some
> of the values have 0s and 1's. I am getting an error if I use the MASS
> function to do this. Is there anyway to get around this?

  The probability *density* of an exact 0 or 1 can be infinite (as you can see by experimenting with dbeta() a bit) -- although it may (?) require shape parameters <1, I don't remember. The general practice (see e.g. Smithson and Verkuilen "better lemon squeezer" paper), as far as I know, is to take something like (x+e)/(1+2*e) where e is a small fudge factor (that can be justified e.g. on Bayesian grounds ...) Presumably if these are p-values then they aren't *exactly* 0/1, just very close to it ... ?

  Would be interested to hear what others had to say.



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 Wed 16 Mar 2011 - 16:55:04 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 Wed 16 Mar 2011 - 17:00:22 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