[R] Error using fitting weibull distribution to some data

Borja Soto Varela
2008-10-29T16:58:42Z

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]]