On Wed, 27 Oct 2004, De la Vega Góngora Jorge wrote: > Why the warning messages (2:4)?
The warnings are about your uninformed use of the function. You have read the reference (as the R posting guide asks) haven't you? You are trying to fit a distribution with parameter > 0 by an *unconstrained* optimizer with a deliberately poor starting value, ignoring warning 1. > > x <- rexp(1000,0.2) > > fitdistr(x,"exponential",list(rate=1)) > rate > 0.219824219 > (0.006951308) > Warning messages: > 1: one-diml optimization by Nelder-Mead is unreliable: use optimize in: optim(start, > mylogfn, x = x, hessian = TRUE, ...) > 2: NaNs produced in: dexp(x, 1/rate, log) > 3: NaNs produced in: dexp(x, 1/rate, log) > 4: NaNs produced in: dexp(x, 1/rate, log) fitdistr(x,"exponential",list(rate=1), lower=0.001, method="L-BFGS-B") would be a much better way, following the examples on the help page. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html