I won't add to the quite long discussion about the vagaries of nlminb, but will note that over a long period of software work in this optimization area I've found a number of programs and packages that do strange things when the objective is a function of a single parameter. Some methods quite explicitly throw an error when n<2. It seems nlminb does not, but that does not mean that the authors ever thought anyone would use their large package to solve a small 1D problem, or if they did, whether they seriously tested for the awkward things that happen when one only has one parameter. I've seen similar things go wrong with matrix packages e.g., eigensolutions of 1 by 1 matrices.

So this msg is to watch carefully when problems are n=1 and put in some checks that answers make sense.

JN

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to