Dear R-users,

Using Maximum-likelihood Fitting (fitdistr function) I've got the next
error:

> fitdistr(datos,"weibull",lower=0)
Error in optim(x = c(1.4625e-06, 0.257854, 0.0001217545, 0.11421005,
0.028721576,  :
  L-BFGS-B *needs finite values of 'fn' *

where "datos" is a vector of length=1000 between 1.4625e-06 and 0.8867114

I add the lower argument in order to avoid dweibull produce "NaNs".If I
don't add the lower argument, the call to fitdistr returns the parameter
estimates with the warning messages below:

Warning message:
In dweibull(x, shape, scale, log) : Se han producido NaNs

Does anyone know how to use fitdistr using the lower parameter to avoid
warnings and avoid the error in optim?

        [[alternative HTML version deleted]]

______________________________________________
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