[R] nlm() problem or MLE problem?
Thomas Lumley
thomas at biostat.washington.edu
Thu Dec 9 17:22:51 CET 1999
On Thu, 9 Dec 1999, Bill Simpson wrote:
> I am trying to do a MLE fit of the weibull to some data, which I attach.
>
>
> I got the starting values a=9, b=.27 from fitting the Weibull CDF by eye
> to a quantile plot of the data. The final values fitted by nlm() are a=
> 4.8299357, b= 0.2753897
>
> I plotted both CDFs against the quantile plot of the data. I would have
> expected the MLE fit to be the one that lies closer to the data. NO.
> The MLE solution (dashed) seems to fit quite badly in comparison with my
> starting values (solid).
>
> I wonder if this is just the way MLE is, or is there a problem with nlm()
> here? There are numerous warnings from nlm(). But the starting values are
> said to give a terrible -log likelihood, which is hard to believe. I am
> using R 65.1 under Linux.
>
> Thanks for any help!
>
> Bill
> PS when I do dweibull(rt,9,.27)
> the last value is 1.003383e-173
> I guess this one observation in the right-hand tail is dominating the
> fit?! It contributes 173 to the -log likelihood
> The nlm() fit to this last point gives 1.550882e-10.
Well, it looks as though the data don't come from a Weibull distribution
(at least that last point).
You can also fit a Weibull with survreg() in survival5, which gives the
same results as nlm without any complaints.
If you drop the last point survreg() gives 9.66 and 0.27 for the MLEs, so
the last point really is the problem. Either the model is badly wrong or
the point is badly wrong, but nlm() is doing fine.
-thomas
Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list