From ripley at stats.ox.ac.uk  Thu Mar 27 08:58:17 2003
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Thu Mar 27 10:02:19 2003
Subject: (PR#2691) Re: [Rd]  optim control trace=-1 gives more output than
 trace=0
In-Reply-To: <200303270040.h2R0edn9006784@pubhealth.ku.dk>
Message-ID: <Pine.LNX.4.44.0303270825400.30323-100000@gannet.stats>

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@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@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


(PR#2691) Re: [Rd] optim control trace=-1 gives more output than trace=0
ripley@stats.ox.ac.uk