[R] profile error on an nls object
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Fri Mar 19 09:06:21 CET 2004
<Bill.Venables at csiro.au> writes:
> > Why is there an error on profile, which should only evaluate the
> > objective function for different parameter values?
>
> profile() doesn't merely evaluate the objective function at
> different parameter values. It holds one of the parameters constant
> and optimises the objective function with respect to all the others.
> This is repeated for a sequence of values passing through the mle, and
> the same for each parameter.
>
> If you fix a parameter at a very unrealistic value (as can happen) it
> is not surprising that the optimisation with respect to all the others
> runs into trouble. This is a computationally difficult area and I am
> more surprised by the cases that work without a hitch than by the ones
> that don't. You can expect to have to tweak things a bit in many cases.
True. I did get some experience with the profiler for the mle() code.
This was originally a fairly straightforward adaptation of the nls
profiler (which, I believe, in turn is an adaptation of profile.glm
which Bill wrote). It did turn out to be quite frail when confronted
with highly non-quadratic likelihoods and bounded domains. Brian
Ripley has since improved the mle profiler quite a bit, with step size
adjustments and try() constructs in critical places.
I must admit that I haven't studied Brian's news code too carefully,
but there's probably still some room for improvement. For instance, it
seems that the local optimization always starts from the global
parameter estimates, which could likely be faster and more stable if
we used the values from the previous step instead.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list