[R] nlm() and optim()
gunter.berton at gene.com
Tue Apr 10 19:13:45 CEST 2007
Numerical optimization is sensitive to (at least) the method chosen,
control/convergence specifications, and the parameterization of the function
being optimized (all of this is well known). Defining what you mean by
"reproduce" in a precise, operational way is therefore essential. You have
not done so. For example, if it is the negative (ln)likelihood of a
statistical model that is being minimized, if the model is overparametrized
so that there are near identifiability issues,the confidence region for the
parameters will essentially be a (possibly quite irregular)lower dimensional
subspace (submanifold) of the full parameter space. Would you say that
results "reproduce " if they fall within this confidence region, even though
they may be quite different than the estimated minima? Issues with possibly
multiple local minima also complicate matters.
Bottom line: Determining when you have"reproduced" results from complex
modelling that rely on numerical optimization for model fitting can be
difficult. Careful and parsimonious modelling is vital.
Genentech Nonclinical Statistics
South San Francisco, CA 94404
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Silvia Lucato
Sent: Tuesday, April 10, 2007 7:32 AM
To: r-help at stat.math.ethz.ch
Subject: [R] nlm() and optim()
I have just joint the list and much appreciate any thoughts on 2 issues.
Firstly, I want to reproduce some minimization results conducted in MATLAB.
I have suceeded with nlm and optim-method CG. I have been told that I should
get also with other optim methods. Actually, I found the same results when
testing a very straightforward equation. However with a more complicated
model it was not true. It is realy possible? Have I got it by chance in the
Secondly, in order to check which optimization is more suitable for our
study, I would like to have the value of the minimized parameters on each
iteration to later plot a "likelihood surface". However, for both nlm and
optim, I could only keep the last iteration results. Is there a way to
store/record the minimized values for each iteration?
Sorry if these questions are reocuring. I have been searching for hints but
did not get too far and I am fairly new to R.
Comments and examples are most welcome.
[[alternative HTML version deleted]]
R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help