Re: [R] Re; Fitting a Beta distribution

2011-03-16 Thread Ben Bolker
Jim Silverton 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

Re: [R] Re; Fitting a Beta distribution

2011-03-16 Thread Kjetil Halvorsen
If yoy write out the likelihood equations for an independent sample size n from the beta(a,b) distribution: L \propto \prod_i dbeta(y_i,a,b) log(L) = constant + \sum_i dbeta(y_i,a,b,log=TRUE) log(L)= constant + \sum_i (a-1) log(y_i) + (b-i) log(1-y_i) you see that your problem comes from trying to

[R] Re; Fitting a Beta distribution

2011-03-16 Thread Jim Silverton
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? -- Thanks, Jim. [[alternative HTML version deleted]] __