Do you have any zeros in your data?
fitdistr() will need start values (see the code),
but even with start values, optim() will have problems.

x <- rweibull(100, 2, 10)
fitdistr(x, "weibull")  ## no problem
fitdistr(c(0,x), "weibull")  ## your error message
fitdistr(c(0,x), "weibull",start=list(shape=2,scale=10))
  ## still an error message from optim()

 -Peter Ehlers

vikrant wrote:
Hi,
I want to estimate parameters of weibull distribution. For this, I am using
fitdistr() function  in MASS package.But when I give fitdistr(c,"weibull") I
get a Error as follows:- Error in optim(x = c(4L, 41L, 20L, 6L, 12L, 6L, 7L, 13L, 2L, 8L, 22L, : non-finite value supplied by optim
Any help or suggestions are most welcomed

--
Peter Ehlers
University of Calgary

______________________________________________
R-help@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.

Reply via email to