[R] constrOptim convergence

Thomas Lumley tlumley at u.washington.edu
Tue Oct 5 20:04:42 CEST 2004


On Tue, 5 Oct 2004, Shuangge Ma wrote:

> Hello, I got a question with the R function constrOptim.
>
>> From the R help, it says that the return values of "constrOptim" are the
> same as "optim". For the return value "convergence" of the function
> "optim", the values should be 0, 1, 10, 51 and 52. See
> http://www.maths.lth.se/help/R/.R/library/stats/html/optim.html
>
> When I use constrOptim, I get "convergence" values 7 and 11. What do they
> mean exactly?
>

You should also get a convergence message with these (in the $message 
component)

7 is "Barrier algorithm ran out of iterations and did not converge"
so the inner iteration converged but the outer iteration with the log 
barrier didn't

11 is "Objective function increased at outer iteration i" (or "decreased" 
if you are doing maximisation). This probably means that you haven't 
found the optimum.

 	-thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle




More information about the R-help mailing list