[R] Beta distribution- help needed

Daniel Malter daniel at umd.edu
Tue Jul 26 15:12:36 CEST 2011


This is not very confusing. It is the exact same error in the sense that this
time the values of x1 are not only outside the interval (0-1) but within
[0-1] as in your first example, but this time they are also outside [0-1].
The reason is that you did not divide x1 by sum(x1) this time. In other
words, the problem that the values you supply to fitdist() are not
permissible by the definition of the distribution "got even worse" if one
may say so. For fitdist() to estimate the parameters of a beta distribution
it needs the values to be in the open interval (0-1).

Read up on http://en.wikipedia.org/wiki/Beta_distribution where the first
sentence says: "In probability theory and statistics, the beta distribution
is a family of continuous probability distributions defined on the interval
(0, 1)..."

HTH,
Daniel


baxy77 wrote:
> 
> ok then this is confusing 
> 
> if i do it like this:
> 
> x1 <- c(100,200,140,98,97,56,42,10,2,2,1,4,3,2,12,3,1,1,1,1,0,0);
> k <-fitdist(x1, "beta")
> plot(k)
> 
>  it says 
> 
> 
> Error in mledist(data, distname, start, fix.arg, ...) : 
>   values must be in [0-1] to fit a beta distribution
> Calls: fitdist -> mledist
> 
> 
> I mean the real problem is the Cullen-Frey plot says it is a beta
> distribution and i want to see its function . how do i do this
> 

--
View this message in context: http://r.789695.n4.nabble.com/Beta-distribution-help-needed-tp3695076p3695639.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list