[R] Beta distribution- help needed

Daniel Malter daniel at umd.edu
Tue Jul 26 10:16:27 CEST 2011


This is a theoretical issue. It is impossible for beta-distributed values to
take the value of 0 or 1. Hence, an attempt to fit a beta distribution to a
vector containing these values fails.

HTH,
Daniel



baxy77 wrote:
> 
> Hi, 
> 
> Well, i need some help, practical and theoretical. I am wondering why the
> fitdistplus (mle function) is returning an error for this code:
> 
> [code]
> x1 <- c(100,200,140,98,97,56,42,10,2,2,1,4,3,2,12,3,1,1,1,1,0,0);
> plotdist(x1);
> descdist(x1, boot =1000);
> y<- sum(x1);
> d= as.vector(length(x1));
> for(i in 1:length(x1)){
>   d[i] = x1[i]/y;
> }
> fitdist(d, "beta")
> 
> [/code] 
> 
> Error: 
> 
> Error in fitdist(d, "beta") : 
>   the function mle failed to estimate the parameters, 
>                 with the error code 100
> 
> and what should i do to fix this ??
> 
> Thank you
> 

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



More information about the R-help mailing list