(PR#2691) Re: [Rd] optim control trace=-1 gives more output than trace=0

ripley at stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu Mar 27 08:58:17 MET 2003


Hmm: does it say what happens for negative values?  I don't think so.

If you use undocumented values of an argument you should expect surprises.
What happens depends on the method argument, BTW.

I've added a warning to read the documentation if trace < 0 is 
supplied.

On Thu, 27 Mar 2003 Robert.King at newcastle.edu.au wrote:

> Full_Name: Robert King
> Version: 1.6.2
> OS: linux
> Submission from: (NULL) (134.148.20.33)
> 
> 
> In optim, non-zero values of trace in the control list are treated as postitive,
> even 
> if they are negative.
> 
> >From documentation:
> 
> trace
> Integer. If positive, tracing information on the progress of the optimization is
> produced. Higher values may produce more tracing information: for method
> "L-BFGS-B" there are six levels of tracing. (To understand exactly what these do
> see the source code: higher levels give more detail.)
> 
> example:
> obj <- function(par){sum(par)}
> par <- c(1,1,1)
> optim(par,obj,control=list(trace=-1))

Not a very useful one!

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list