From Martin Maechler <maechler@stat.math.ethz.ch>  Fri Nov 21 17:05:43 1997
From: Martin Maechler <maechler@stat.math.ethz.ch> (Martin Maechler)
Date: Fri, 21 Nov 1997 18:05:43 +0100
Subject: R-alpha: nlm and gradients
In-Reply-To: <6r4t56qq25.fsf@franz.stat.wisc.edu> (message from Douglas Bates
 on 21 Nov 1997 08:28:34 -0600)
Message-ID: <199711211705.SAA07895@sophie.ethz.ch>

>>>>> "DougB" == Douglas Bates <bates@stat.wisc.edu> writes:

    DougB> At present the documentation for nlm refers the reader to Dennis
    DougB> and Schnabel for details on the algorithms.  It also states that
    DougB> the function is liable to change.

    DougB> Can anyone tell me if the current version of nlm uses only
    DougB> function values or if it can use gradients and Hessians when
    DougB> they are available?  I would like to get an idea of how
    DougB> difficult it would be to port the development versions of our
    DougB> linear mixed-effects code.

Hello Doug,
 thank you for thinking about the port !!

Unfortunately, the current version of
	src/main/optimize.c
still contains

o.c>   static int F77_SYMBOL(d1fcn)(int *n, double *x, double *g)
o.c>   {
o.c>     error("optimization using analytic gradients not implemented (yet)\n");
o.c>   }
o.c>
o.c>   static int F77_SYMBOL(d2fcn)(int *n, double *x, double *g)
o.c>   {
o.c>     error("optimization using analytic Hessians not implemented (yet)\n");
o.c>   }

(optimize.c is unchanged since 0.50-a4).

The underlying Fortran code would allow gradients and hessians;
the ``only'' remaining thing is to use the internal code in R which
is used for 'deriv(.)' to compute algebraic derivatives ...

Martin Maechler <maechler@stat.math.ethz.ch>		 <><
Seminar fuer Statistik, SOL G1
ETH (Federal Inst. Technology)	8092 Zurich	 SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1086
http://www.stat.math.ethz.ch/~maechler/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=---
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=---


R-alpha: nlm and gradients
Martin Maechler